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

If save the log as a file, a disk failure will cause the node to crash. #929

Closed
liujun-dlink opened this issue Aug 9, 2019 · 1 comment · Fixed by #1097, #529 or #1089
Closed

If save the log as a file, a disk failure will cause the node to crash. #929

liujun-dlink opened this issue Aug 9, 2019 · 1 comment · Fixed by #1097, #529 or #1089
Labels
bug Something isn't working
Milestone

Comments

@liujun-dlink
Copy link

If save the log as a file, a disk failure will cause the node to crash. It is recommended that add an exception capture when write to log file.

@lamweili
Copy link
Contributor

The appenders cause the Node.js process to exit as there was no listener for its 'error' event.
Fixed in #529, #1089, #1097 of log4js@6.4.0 by adding an 'error' listener to EventEmitter.

If an EventEmitter does not have at least one listener registered for the 'error' event, and an 'error' event is emitted, the error is thrown, a stack trace is printed, and the Node.js process exits.
(src: https://nodejs.org/docs/latest/api/events.html#error-events)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants