-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
logger error event handler not working #511
Comments
This should not happen, but if it is happening it is a bug. What version of |
I am using:- |
Error handling for the `fs.stat` call in daily-rotate & file transports was setup to only emit errors that weren't ENOENT errors. For ENOENT errors it calls createAndFlush(0) and then does nothing to handle the error. Logic was changed to always emit errors and call createAndFlush(0) if the error is an ENOENT error. fixes winstonjs#511
Error handling for the `fs.stat` call in daily-rotate & file transports was setup to only emit errors that weren't ENOENT errors. For ENOENT errors it calls createAndFlush(0) and then does nothing to handle the error. Logic was changed to always emit errors and call createAndFlush(0) if the error is an ENOENT error. fixes winstonjs#511
In this commit file & daily-rotate-file add an 'error' event listener on their stream so that we can emit those errors from the transport. fixes winstonjs#511
In this commit file & daily-rotate-file add an 'error' event listener on their stream so that we can emit those errors from the transport. fixes winstonjs#511
Any idea when will this commit get pulled in trunk? |
I have the same error, hasn't it been fixed yet? const execution = new winston.Logger({ events.js:160 Error: ENOENT: no such file or directory, open '/Library/WebServer/Documents/apis/desarrollo/chase/logs/execution.log' |
Below is the piece of code I tried to run:-
Even though I have handled the error event of the logger the code is still throwing an error:
The text was updated successfully, but these errors were encountered: