修复启动参数log-size单位错误bug (#2598)

FileChannel内部已经把做了转换为MB操作,外面无须再乘以1024x1024
This commit is contained in:
夏楚 2023-06-28 14:55:39 +08:00 committed by GitHub
parent 2771bc15a5
commit 2ad44bc773
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -240,7 +240,7 @@ int start_main(int argc,char *argv[]) {
// 日志最多保存天数
fileChannel->setMaxDay(cmd_main["max_day"]);
fileChannel->setFileMaxCount(cmd_main["log-slice"]);
fileChannel->setFileMaxSize(1024 * 1024 * cmd_main["log-size"].as<uint32_t>());
fileChannel->setFileMaxSize(cmd_main["log-size"]);
Logger::Instance().add(fileChannel);
#endif // !defined(ANDROID)