Browse Source

更新日志默认配置文件

storage-in-realtime
zhaohe 12 months ago
parent
commit
0c6bd85168
  1. 12
      appdep/iflytop/core/spdlogfactory/logger_factory.cpp

12
appdep/iflytop/core/spdlogfactory/logger_factory.cpp

@ -139,26 +139,17 @@ static bool c_daily_file_sink_mt(json j) {
} }
}; };
#endif #endif
static string default_config = R"( static string default_config = R"(
[ [
{ {
"name": "infologger", "name": "infologger",
"type": "daily_file_sink_mt", "type": "daily_file_sink_mt",
"filename": "logs/infolog.log", "filename": "logs/infolog.log",
"max_files": 30,
"max_files": 3,
"rotate_on_open": true, "rotate_on_open": true,
"level" : 2 "level" : 2
}, },
{ {
"name": "debuglogger",
"type": "daily_file_sink_mt",
"filename": "logs/debuglog.log",
"max_files": 10,
"rotate_on_open": true,
"level": 0
},
{
"name": "terminal", "name": "terminal",
"type": "stdout_color_sink_mt" "type": "stdout_color_sink_mt"
}, },
@ -168,7 +159,6 @@ static string default_config = R"(
"level": 2, "level": 2,
"sinks": [ "sinks": [
"terminal", "terminal",
"debuglogger",
"infologger" "infologger"
] ]
} }

Loading…
Cancel
Save