[Pkg-javascript-commits] [node-log-driver] 04/49: Update README.md

Bastien Roucariès rouca at moszumanska.debian.org
Thu Feb 22 12:56:58 UTC 2018


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-log-driver.

commit b39bcc54467e0d95884374131ed61de97316cfeb
Author: Gregg Caines <gregg at caines.ca>
Date:   Sun Mar 17 20:17:19 2013 -0700

    Update README.md
---
 README.md | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index afc9809..84fc7b6 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,25 @@
 logdriver
 =========
 
-node logger that only logs to stdout
+Logdriver is a node.js logger that only logs to stdout.
+
+####You're going to want to log the output of stdout and stderr anyway, so you might as well put all your logging through std-out.  Logging libraries that don't write to stdout or stderr are missing absolutely critical output like the stack trace if/when your app dies.  
+
+##There are some other nice advantages:
+* When working on your app locally, logs just show up in stdout just like if you'd used console.log().  That's a heck of a lot simpler than tailing a log file.
+* Logging transports can be externalized from your app entirely, and completely decoupled.  This means if you want to log to irc, you write an irc client script that reads from stdin, and you just pipe your app's output to that script.
+```console
+node yourapp.js 2>&1 | node ircloggerbot.js 
+```
+* You can still easily log to a file on a production server by piping your stdout and stderr to a file like so when you initialize your app:
+```console
+node yourapp.js 2>&1 >> somefile.log 
+```
+NB: If you're logging to a file, [Logrotate](http://linuxcommand.org/man_pages/logrotate8.html) is probably going to be your best friend.
+* You can still easily log to syslog by piping your stdout and stderr to the 'logger' command like so:
+```console
+node yourapp.js 2>&1 | logger
+```
+
+##Usage:
+Coming soon

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-log-driver.git



More information about the Pkg-javascript-commits mailing list