Make stdout logging pretty
This commit is contained in:
parent
27ab839df4
commit
4a5d514cc7
@ -75,7 +75,7 @@ pub fn init_tracing(
|
||||
config: &Config,
|
||||
log_sender: Sender<Bytes>,
|
||||
) -> Result<(WorkerGuard, WorkerGuard)> {
|
||||
let fmt_layer = tracing_subscriber::fmt::layer();
|
||||
let stdout_layer = tracing_subscriber::fmt::layer().pretty();
|
||||
let filter_layer = EnvFilter::from_default_env();
|
||||
let file_appender = tracing_appender::rolling::hourly("./logs", "log");
|
||||
let (file_writer, file_writer_guard) = tracing_appender::non_blocking(file_appender);
|
||||
@ -85,7 +85,7 @@ pub fn init_tracing(
|
||||
let mem_writer_layer = tracing_subscriber::fmt::layer().with_writer(mem_writer);
|
||||
tracing_subscriber::registry()
|
||||
.with(filter_layer)
|
||||
.with(fmt_layer)
|
||||
.with(stdout_layer)
|
||||
.with(file_writer_layer)
|
||||
.with(mem_writer_layer)
|
||||
.init();
|
||||
|
Loading…
Reference in New Issue
Block a user