From 34e51db33f15c3fc182cda47388c999c00580496 Mon Sep 17 00:00:00 2001 From: Daniel Ochoa Date: Thu, 2 Apr 2015 10:55:19 -0500 Subject: [PATCH] add logging to file example to readme --- Readme.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index eb7d6bfa..b4f45e3c 100644 --- a/Readme.md +++ b/Readme.md @@ -53,8 +53,8 @@ setInterval(function(){ #### Windows note - On Windows the environment variable is set using the `set` command. - + On Windows the environment variable is set using the `set` command. + ```cmd set DEBUG=*,-not_this ``` @@ -147,6 +147,16 @@ error('now goes to stdout via console.info'); log('still goes to stdout, but via console.info now'); ``` +### Save debug output to a file + +You can save all debug statements to a file by piping them. + +Example: + +```bash +$ DEBUG_FD=3 node your-app.js 3> whatever.log +``` + ## Authors - TJ Holowaychuk