prettierrc
This commit is contained in:
14
index.js
14
index.js
@@ -21,22 +21,22 @@ prettyStdOut.pipe(process.stdout)
|
||||
var logger = function (option) {
|
||||
option = option || {}
|
||||
return bunyan.createLogger({
|
||||
name: "log",
|
||||
name: 'log',
|
||||
src: false,
|
||||
streams: [
|
||||
{
|
||||
level: 'info',
|
||||
stream: prettyStdOut
|
||||
stream: prettyStdOut,
|
||||
},
|
||||
{
|
||||
level: 'info',
|
||||
type: 'rotating-file',
|
||||
path: path.join(option.root || 'data.log/', '/', option.file || 'info.log'),
|
||||
period: '1d', // daily rotation
|
||||
count: 30 // keep 30 days
|
||||
}
|
||||
]
|
||||
period: '1d', // daily rotation
|
||||
count: 30, // keep 30 days
|
||||
},
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
module.exports=logger // trace, debug, info, warn, error, fatal
|
||||
module.exports = logger // trace, debug, info, warn, error, fatal
|
||||
|
||||
Reference in New Issue
Block a user