-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
Better logging with winston #1234
Conversation
Current coverage is
|
@@ -254,7 +263,7 @@ class ParseServer { | |||
if (!process.env.TESTING) { | |||
process.on('uncaughtException', (err) => { | |||
if ( err.code === "EADDRINUSE" ) { // user-friendly message for this common error | |||
console.log(`Unable to listen on port ${err.port}. The port is already in use.`); | |||
log.error(`Unable to listen on port ${err.port}. The port is already in use.`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one I think actually should be console.log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alright!
Looks good to me aside from the one thing. @peterdotjs you wrote most of this code, want to take a look? |
LGTM. |
Merge when you like :) |
Centralizes all logs (including verbose) through winston.
Makes all logs available through the API