Skip to content

Commit

Permalink
aw-server: Increase default log levels further
Browse files Browse the repository at this point in the history
  • Loading branch information
johan-bjareholt committed Mar 28, 2020
1 parent c34b7f6 commit afbb70c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions aw-server/src/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ pub fn setup_logger(testing: bool) -> Result<(), fern::InitError> {
// Set some Rocket messages to debug level
// TODO: Log more if run in development/testing mode
.level(log::LevelFilter::Info)
.level_for("rocket::rocket", log::LevelFilter::Warn)
.level_for("_", log::LevelFilter::Warn)
.level_for("rocket", log::LevelFilter::Warn)
.level_for("_", log::LevelFilter::Warn) // Rocket requests
.level_for("launch_", log::LevelFilter::Warn) // Rocket config info
.format(move |out, message, record| {
out.finish(format_args!(
"[{}][{}][{}]: {}",
Expand All @@ -43,13 +44,11 @@ pub fn setup_logger(testing: bool) -> Result<(), fern::InitError> {
// Color and higher log levels to stdout
.chain(
fern::Dispatch::new()
//.level_for("aw_server", log::LevelFilter::Debug)
.chain(std::io::stdout()),
)
// No color and lower log levels to logfile
.chain(
fern::Dispatch::new()
.level_for("aw_server", log::LevelFilter::Info)
.format(|out, message, _record| {
out.finish(format_args!(
// TODO: Strip color info
Expand Down

0 comments on commit afbb70c

Please sign in to comment.