diff options
author | FxQnLr <[email protected]> | 2024-02-25 15:27:54 +0100 |
---|---|---|
committer | FxQnLr <[email protected]> | 2024-02-25 15:27:54 +0100 |
commit | 91cd665671d564620bce13e693cd7ecaad697db9 (patch) | |
tree | d560273df2eece276cbda021cb4e95c044bb19df /src | |
parent | 9058f191b69ecafc8fdeace227ac113412d03888 (diff) | |
download | webol-91cd665671d564620bce13e693cd7ecaad697db9.tar webol-91cd665671d564620bce13e693cd7ecaad697db9.tar.gz webol-91cd665671d564620bce13e693cd7ecaad697db9.zip |
Closes #11. Write log to file. Update deps
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index eae89f6..d17984f 100644 --- a/src/main.rs +++ b/src/main.rs | |||
@@ -33,7 +33,11 @@ async fn main() -> color_eyre::eyre::Result<()> { | |||
33 | time::macros::format_description!("[year]-[month]-[day] [hour]:[minute]:[second]"); | 33 | time::macros::format_description!("[year]-[month]-[day] [hour]:[minute]:[second]"); |
34 | let loc = UtcTime::new(time_format); | 34 | let loc = UtcTime::new(time_format); |
35 | 35 | ||
36 | let file_appender = tracing_appender::rolling::daily("logs", "webol.log"); | ||
37 | let (non_blocking, _guard) = tracing_appender::non_blocking(file_appender); | ||
38 | |||
36 | tracing_subscriber::registry() | 39 | tracing_subscriber::registry() |
40 | .with(fmt::layer().with_writer(non_blocking).with_ansi(false)) | ||
37 | .with(fmt::layer().with_timer(loc)) | 41 | .with(fmt::layer().with_timer(loc)) |
38 | .with( | 42 | .with( |
39 | EnvFilter::builder() | 43 | EnvFilter::builder() |