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

log to stdout? #5

Open
wenzowski opened this issue Dec 23, 2014 · 2 comments
Open

log to stdout? #5

wenzowski opened this issue Dec 23, 2014 · 2 comments

Comments

@wenzowski
Copy link
Collaborator

Highly recommend logging to STDOUT by default, in keeping with the principles of the 12 factor app

Would a migration from log4js to visionmedia/debug be realistic?

I'd also like to point out that since debug is already used by many of your dependencies, including, but not limited to, connect and express the ability to toggle log levels by module is extremely useful.

Quick summary of all of all dependencies which use debug can be found by inspecting their package.json declarations (snippet uses ggreer/the_silver_searcher):

ag -G package.json '"debug"' node_modules/
@KnowledgeGarden
Copy link
Owner

Frankly, this looks interesting, but...
Does it persist exceptions and traces before them to actual log files in order to figure out what bombed during production runs?

@wenzowski
Copy link
Collaborator Author

indeed. Persisting logs is crucial. Given you're using ubuntu, the standard bash stream redirection syntax works in upstart jobs:

exec node server.js >> /var/log/TQPortal/web-1.log 2>&1

A great way to generate upstart (and other process monitor config files) is using node-forman.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants