README
logz
Logz is a simple, dependency free, Node.js module for logging.
Use
npm install logz
Logz must be initialized but if no params are sent on init the values below are used.
var logz = require('logz'); logz.init({ dir: './logs', // logs directory file: '/log.txt', // log file name level: 'debug', // err, info, debug console: true // log to console });
Levels
There are three levels: err, info, and debug.
err
Logged for all levels.
logz.err('something failed') // -> timestamp ERROR something failed
info
Logged for err, and info levels.
logz.info('something happened') // -> timestamp INFO something happened
debug
Logged only for the debug level.
logz.debug('some response object') // -> timestamp DEBUG some response object