Skip to content
New issue

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

Facing EPERM Issue while oprning file. #369

Open
vishalshingate opened this issue Mar 29, 2023 · 0 comments
Open

Facing EPERM Issue while oprning file. #369

vishalshingate opened this issue Mar 29, 2023 · 0 comments

Comments

@vishalshingate
Copy link

vishalshingate commented Mar 29, 2023

I have a daily limit of files of 10. if that limit reaches audit.json gets updated but files from windows are not getting deleted until the application restart and that file is not accessible getting an EPERM error.

EPERM: operation not permitted, open 'C:\FLOW2\PM2\logs\engine_out-2023-03-21.log'

const { createLogger, transports, format } = require('winston');
let outTransporter = new (transports.DailyRotateFile)({
level: 'trace',
levelOnly: false,
filename: microServiceName +'_out-%DATE%.log',
dirname: logPath,
datePattern: rotationPattern,
maxSize: maxSize,
maxFiles: maxFiles,
auditFile: auditFilePath
});
let errorTransporter = new (transports.DailyRotateFile)({
level: 'error',
levelOnly: true,
filename: microServiceName +'_error-%DATE%.log',
dirname: logPath,
datePattern: rotationPattern,
maxSize: maxSize,
maxFiles: maxFiles,
auditFile: auditFilePath
});
I guess this is related to this #261

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant