file transport for book logging framework
Switch branches/tags
Nothing to show
Latest commit c6c040a May 11, 2012 @defunctzombie defunctzombie when log file moves make a new file with original name
- supports moving log files to rotate them
Failed to load latest commit information.
.gitignore initial May 10, 2012 format readme May 10, 2012
index.js when log file moves make a new file with original name May 11, 2012
package.json 0.0.1 May 10, 2012
test.js initial May 10, 2012

book-file is a file transport for the book logging framework. It will write out the json contents of the log entry.


npm install book-file


book-file is used like all other book middleware. Just add it to your logger object. I recommend you create a file log.js for your project where you setup the logger however you desire across your entire project.

// some logger you have created
var log = require('book').default();

// adds the file logging middleware to the logger
    filename: '/path/to/file.log'

// log stuffs, it will go to the log file'hello world!');

file.log will contain something along the lines of:

{ "level": 3, "timestamp": 12345, "message": "hello world!" }