implement tracing

This commit is contained in:
mbecker20
2024-01-15 01:29:26 -08:00
parent f97e48e886
commit 2b4ebd6e10
26 changed files with 163 additions and 153 deletions

View File

@@ -33,13 +33,12 @@ pub fn config_load(config_path: &str) -> CoreConfig {
})
}
pub fn into_log_level(value: LogLevel) -> log::LevelFilter {
pub fn into_log_level(value: LogLevel) -> tracing::Level {
match value {
LogLevel::Off => log::LevelFilter::Off,
LogLevel::Error => log::LevelFilter::Error,
LogLevel::Warn => log::LevelFilter::Warn,
LogLevel::Info => log::LevelFilter::Info,
LogLevel::Debug => log::LevelFilter::Debug,
LogLevel::Trace => log::LevelFilter::Trace,
LogLevel::Error => tracing::Level::ERROR,
LogLevel::Warn => tracing::Level::WARN,
LogLevel::Info => tracing::Level::INFO,
LogLevel::Debug => tracing::Level::DEBUG,
LogLevel::Trace => tracing::Level::TRACE,
}
}