Skip to content

Commit

Permalink
change: Default log level to warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Nukesor committed Aug 24, 2024
1 parent b11ecce commit afa5b0a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ TLDR: The new task state representation is more verbose but significantly cleane
**Important: The Pueue daemon needs to be restarted and the state will be wiped clean.**
- **Breaking**: Streamlined `pueue log` parameters to behave the same way as `start`, `pause` or `kill`. [#509](https://github.com/Nukesor/pueue/issues/509)
- **Breaking**: Remove the `--children` commandline flags, that have been deprecated and no longer serve any function since `v3.0.0`.
- **Breaking**: Send log output to `stderr` instead of `stdout` [#562](https://github.com/Nukesor/pueue/issues/562).
- Send log output to `stderr` instead of `stdout` [#562](https://github.com/Nukesor/pueue/issues/562).
- Change default log level from error to warning [#562](https://github.com/Nukesor/pueue/issues/562).

### Add

Expand Down
8 changes: 4 additions & 4 deletions pueue/src/bin/pueue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ async fn main() -> Result<()> {

// Init the logger and set the verbosity level depending on the `-v` flags.
let level = match opt.verbose {
0 => LevelFilter::Error,
1 => LevelFilter::Warn,
2 => LevelFilter::Info,
_ => LevelFilter::Debug,
0 => LevelFilter::Warn,
1 => LevelFilter::Info,
2 => LevelFilter::Debug,
_ => LevelFilter::Trace,
};

// Try to initialize the logger with the timezone set to the Local time of the machine.
Expand Down
8 changes: 4 additions & 4 deletions pueue/src/bin/pueued.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ async fn main() -> Result<()> {

// Set the verbosity level of the logger.
let level = match opt.verbose {
0 => LevelFilter::Error,
1 => LevelFilter::Warn,
2 => LevelFilter::Info,
_ => LevelFilter::Debug,
0 => LevelFilter::Warn,
1 => LevelFilter::Info,
2 => LevelFilter::Debug,
_ => LevelFilter::Trace,
};

// Try to initialize the logger with the timezone set to the Local time of the machine.
Expand Down
4 changes: 2 additions & 2 deletions pueue/src/client/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::{borrow::Cow, collections::HashMap};
use anyhow::{bail, Context, Result};
use clap::crate_version;
use crossterm::tty::IsTty;
use log::error;
use log::{error, warn};

use pueue_lib::network::message::*;
use pueue_lib::network::protocol::*;
Expand Down Expand Up @@ -110,7 +110,7 @@ impl Client {
};

if show_warning {
error!(
warn!(

Check warning on line 113 in pueue/src/client/client.rs

View check run for this annotation

Codecov / codecov/patch

pueue/src/client/client.rs#L113

Added line #L113 was not covered by tests
"Different daemon version detected '{version}'. Consider restarting the daemon."
);
}
Expand Down

0 comments on commit afa5b0a

Please sign in to comment.