Skip to content

Commit

Permalink
Added log-panics to handle logging server thread panics
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtread committed Sep 2, 2023
1 parent fd6f7e8 commit 466fcf6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ serde_json = "1"

# Logging facade
log = { version = "0.4", features = ["serde"] }
log-panics = { version = "2", features = ["with-backtrace"] }

# Blaze packet system & SSLv3 async impl
blaze-pk = "1.3"
Expand Down
3 changes: 3 additions & 0 deletions src/utils/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ pub fn setup(logging_level: LevelFilter) {
.expect("Failed to create logging config");

init_config(config).expect("Unable to initialize logger");

// Include panics in logging
log_panics::init();
}

/// Prints a list of possible urls that can be used to connect to
Expand Down

0 comments on commit 466fcf6

Please sign in to comment.