in src/logger.js [14:39]
function loggerInit(directory, quiet = false, logLevel = 'info') {
// replaces characters that windows does not allow in filenames
logFileDestination = path.join(directory, 'log_' + new Date().toISOString().replaceAll(/[.:]/g, '-') + '.txt');
const streams = [
{
level: logLevel,
stream: pretty({
destination: logFileDestination,
mkdir: true,
colorize: false,
translateTime: 'yyyy-mm-dd HH:MM:ss',
ignore: 'pid,hostname'
})
},
]
// using pino.multistream seems to resolve some issues with file logging in windows environments that occurred when pino.transport was used instead
fileLogger = pino({
level: logLevel
}, pino.multistream(streams));
if (quiet) {
console.log = function(){};
console.info = function(){};
console.debug = function(){};
}
}