0.0.10 • Published 5 years ago
onlylog v0.0.10
onlylog
onlylog , A pretty simple logger for Node.js
Installation
npm install onlylog
Usage
Getting start
var OnlyLog = require('onlylog')
var log = OnlyLog({
fileName : '[test-]YYYY-MM-DD[.log]', //define log file
});
log.info('xxxx')
api
OnlyLog(options)
one of options.filename and options.stream is required
options
{ fileName : '[test-]YYYY-MM-DD[.log]', //define log file allLevels : ['info', 'debug', 'warn', 'error'], //define api name logLevels : ['info'], //define the level need to write to file duration : 5000, // flush buffer time, default is 2000 bufferLength : 1000, // max buffer length, default is 0 format: // custom format function function (level) { return function () { return arguments.toString() } }, stream: process.stdout, // use stream instead of default file ouput rotation: 7 // 日志默认保留7天 }
0.0.10
5 years ago
0.0.9
6 years ago
0.0.8
6 years ago
0.0.7
6 years ago
0.0.6
6 years ago
1.0.0-beta16
6 years ago
1.0.0-beta15
6 years ago
1.0.0-beta14
6 years ago
1.0.0-beta13
6 years ago
1.0.0-beta12
6 years ago
1.0.0-beta11
6 years ago
1.0.0-beta10
6 years ago
1.0.0-beta9
6 years ago
1.0.0-beta8
6 years ago
1.0.0-beta7
6 years ago
1.0.0-beta6
6 years ago
1.0.0-beta5
6 years ago
1.0.0-beta4
6 years ago
1.0.0-beta3
8 years ago
1.0.0-beta2
8 years ago
0.0.5
8 years ago
1.0.0-beta1
8 years ago
0.0.4
9 years ago
0.0.3
9 years ago
0.0.2
9 years ago
0.0.1
9 years ago