how can i change log timezone #773
-
i find log time use utc time , i'm in utc+8 so I need cst time zone, but i dont'know how to change timezone. it seems can to change with_timer , tracing_subscriber::fmt()
.with_writer(mk_writer)
.with_max_level(Level::TRACE)
.with_timer(tracing_subscriber::fmt::time::time())
.init(); i find https://github.com/tokio-rs/tracing/blob/master/tracing-subscriber/src/fmt/time/time_crate.rs 110 line it seem wite like follow code ,but if i write this code, compile will says there is no use tracing_subscriber::fmt::{self, time::LocalTime};
use time::macros::format_description;
let timer = LocalTime::new(format_description!("[hour]:[minute]:[second]"));
tracing_subscriber::fmt()
.with_writer(mk_writer)
.with_max_level(Level::TRACE)
.with_timer(timer)
// .with_timer(tracing_subscriber::fmt::time::Uptime::)
.init(); i really don't know how to change |
Beta Was this translation helpful? Give feedback.
Answered by
davidpdrsn
Feb 20, 2022
Replies: 1 comment 1 reply
-
This isn't related to axum. Try asking in the tracing repo. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
jplatte
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This isn't related to axum. Try asking in the tracing repo.