mirror of
https://github.com/CDrummond/bliss-analyser.git
synced 2026-10-22 22:32:08 +03:00
If log level set to 'trace' then set this level for the Bliss library too.
Issue #17
This commit is contained in:
1 parent
1e00e9593a
commit
786b7d2c2d
2 files changed
+3
-1
No files matched your search
+2
-1
@@ -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())
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user