You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 28, 2018. It is now read-only.
By default debug uses stderr (console.error) as the output source. The message in the example above is not an error but information, so it should be outputted to stdout.
You can either fix this by following this explanation or by using a more fully featured logging library like bunyan if you're going to do a lot of logging.
The text was updated successfully, but these errors were encountered:
voldern
changed the title
Use of logging library
Logging to stderr (usage of debug)
Nov 25, 2015
Thanks a lot for the feedback. We'll be looking at this.
Do you have any experience with bunyan in isomorphic/universal apps btw? I believe it can probably be bundled for clients, but it may be a bit bloated. Experiences welcome.
I've never tried it on the frontend, but according to https://github.com/trentm/node-bunyan it supports browserify/webpack. So the question then is the code size and if there is a need for it on the frontend.
I think the advisable thing to do here is to use both since some of the packages that we use support debug internally. Need to look more into this, it might be the case that bunyan can manage this for us as well.
The size of bunyan should not be a problem since we only want to log in development on the client and can easily remove it from the production build.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I've started to quickly skim through the code, and looking here https://github.com/vgno/roc-web/blob/master/src/app/server/index.js#L72 I see that you use debug for logging.
By default
debug
usesstderr
(console.error) as the output source. The message in the example above is not an error but information, so it should be outputted tostdout
.You can either fix this by following this explanation or by using a more fully featured logging library like bunyan if you're going to do a lot of logging.
The text was updated successfully, but these errors were encountered: