We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
const fileTransportOptions: DailyRotateFileTransportOptions = { dirname: path.resolve(DATA_DIRECTORY, 'logs'), extension: '.log', filename: 'server-%DATE%', format: winston.format.combine( winston.format.timestamp({ format: TIMESTAMP_FORMAT, }), winston.format.uncolorize(), winston.format.json(), winston.format.printf((info) => { info.message = (info.message as string).trim(); return JSON.stringify(info); }), ), json: true, maxFiles: '30d', watchLog: true, // <=========================== important part here }; const fileTransport = new DailyRotateFile(fileTransportOptions);
Run the code with the options above. Delete the log file while it's running.
The file should be regenerated and the logging should continue after the file is deleted.
The file is not regenerated. I must restart my code for the log file to come back.
winston version: 3.7.2 winston-daily-rotate-file version: 4.6.1 winston-transport version: 4.5.0 system: WSL 2 node version: 18.7.0
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Code Excerpt
Steps
Run the code with the options above. Delete the log file while it's running.
Expected Behavior
The file should be regenerated and the logging should continue after the file is deleted.
Actual Bahavior
The file is not regenerated. I must restart my code for the log file to come back.
System Details
winston version: 3.7.2
winston-daily-rotate-file version: 4.6.1
winston-transport version: 4.5.0
system: WSL 2
node version: 18.7.0
The text was updated successfully, but these errors were encountered: