summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorFxQnLr <[email protected]>2024-02-25 15:27:54 +0100
committerFxQnLr <[email protected]>2024-02-25 15:27:54 +0100
commit91cd665671d564620bce13e693cd7ecaad697db9 (patch)
treed560273df2eece276cbda021cb4e95c044bb19df /src/main.rs
parent9058f191b69ecafc8fdeace227ac113412d03888 (diff)
downloadwebol-91cd665671d564620bce13e693cd7ecaad697db9.tar
webol-91cd665671d564620bce13e693cd7ecaad697db9.tar.gz
webol-91cd665671d564620bce13e693cd7ecaad697db9.zip
Closes #11. Write log to file. Update deps
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs4
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()