spdlog: set flush interval to 500ms

This commit is contained in:
Sandeep Somavarapu 2018-09-06 20:50:02 +02:00
parent 5a899655ac
commit 0b0335ae7f

View file

@ -13,7 +13,7 @@ export function createSpdLogService(processName: string, logLevel: LogLevel, log
// Do not crash if spdlog cannot be loaded
try {
const _spdlog: typeof spdlog = require.__$__nodeRequire('spdlog');
_spdlog.setAsyncMode(8192, 2000);
_spdlog.setAsyncMode(8192, 500);
const logfilePath = path.join(logsFolder, `${processName}.log`);
const logger = new _spdlog.RotatingLogger(processName, logfilePath, 1024 * 1024 * 5, 6);
logger.setLevel(0);