mirror of
https://github.com/CDrummond/bliss-analyser.git
synced 2025-04-07 20:50:04 +03:00
If log level set to 'trace' then set this level for the Bliss library too.
Issue #17
This commit is contained in:
parent
1e00e9593a
commit
786b7d2c2d
@ -9,6 +9,7 @@
|
||||
5. If new files analysed and 'ignore' file exists then update DB's 'ignore'
|
||||
flags.
|
||||
6. Add option to write analysis results to files, and use for future scans.
|
||||
7. If log level set to 'trace' then set this level for the Bliss library too.
|
||||
|
||||
0.2.3
|
||||
-----
|
||||
|
@ -84,8 +84,9 @@ fn main() {
|
||||
|| logging.eq_ignore_ascii_case("warn") || logging.eq_ignore_ascii_case("error")) {
|
||||
logging = String::from("info");
|
||||
}
|
||||
let bliss_level = if logging.eq_ignore_ascii_case("trace") { LevelFilter::Trace } else { LevelFilter::Error };
|
||||
let mut builder = env_logger::Builder::from_env(env_logger::Env::default().filter_or("XXXXXXXX", logging));
|
||||
builder.filter(Some("bliss_audio"), LevelFilter::Error);
|
||||
builder.filter(Some("bliss_audio"), bliss_level);
|
||||
builder.format(|buf, record| {
|
||||
writeln!(buf, "[{} {:.1}] {}", Local::now().format("%Y-%m-%d %H:%M:%S"), record.level(), record.args())
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user