-
-
Notifications
You must be signed in to change notification settings - Fork 209
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
chore(#9080): adds logger shared lib #9083
Conversation
Signed-off-by: Diana Barsan <[email protected]>
Signed-off-by: Diana Barsan <[email protected]>
Signed-off-by: Diana Barsan <[email protected]>
Signed-off-by: Diana Barsan <[email protected]>
Signed-off-by: Diana Barsan <[email protected]>
Signed-off-by: Diana Barsan <[email protected]>
Signed-off-by: Diana Barsan <[email protected]>
Can I please have your thoughts @garethbowen ? Thanks!! |
Signed-off-by: Diana Barsan <[email protected]>
Signed-off-by: Diana Barsan <[email protected]>
# Conflicts: # package-lock.json
Signed-off-by: Diana Barsan <[email protected]>
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.
One refactor suggestion, but otherwise this is great!
}); | ||
}, | ||
}; | ||
module.exports = { |
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.
❤️
@@ -1,19 +1,19 @@ | |||
const rewire = require('rewire'); |
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.
Woohoo! Death to rewire!
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.
yes! i concur!
@dianabarsan One more random thought... in node services we often log like |
Correct, this kind of formatting won't work in the browser. Nothing is going to break, but we won't achieve the desired result. I suppose we can continue to use this format when we know the code will only be used in nodejs - in libraries like server-checks for example. |
@dianabarsan What about this: https://www.npmjs.com/package/winston-transport-browserconsole ? It might mean the logging API is consistent between node and browser? |
I've read about it. People said it bulks the browser bundle. I'll try it out though. |
It looks like It looks like Do you think it's worth more time working out how to generalize logging in webapp in this PR? |
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.
Awesome, thanks!
Description
#9080
Code review checklist
Compose URLs
If Build CI hasn't passed, these may 404:
License
The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.