修改日志配置
This commit is contained in:
parent
876dc56050
commit
ad6ede61d7
@ -30,7 +30,8 @@ pub fn init_log(config: &Config) -> (WorkerGuard, WorkerGuard) {
|
||||
.with(
|
||||
fmt::layer()
|
||||
.with_writer(file_tracing_appender.with_max_level(package_level(&logger_cfg.level)))
|
||||
.with_ansi(true) // 关掉ansi的颜色输出功能
|
||||
.with_ansi(false) // 关掉ansi的颜色输出功能
|
||||
// .json()
|
||||
.with_timer(LocalTimer),
|
||||
)
|
||||
.with(
|
||||
@ -38,12 +39,12 @@ pub fn init_log(config: &Config) -> (WorkerGuard, WorkerGuard) {
|
||||
.with_writer(
|
||||
stdout_tracing_appender.with_max_level(package_level(&logger_cfg.level)),
|
||||
)
|
||||
// .with_file(true)
|
||||
.with_line_number(true) // 写入标准输出
|
||||
.with_ansi(false) // 关掉ansi的颜色输出功能
|
||||
.with_ansi(true)
|
||||
.with_timer(LocalTimer)
|
||||
.json()
|
||||
.flatten_event(true),
|
||||
// .json()
|
||||
// .flatten_event(true)
|
||||
,
|
||||
)
|
||||
.init(); // 初始化并将SubScriber设置为全局SubScriber
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user