winstonflight
v1.0.5
Published
A winston wrapper to enable adding transports by config
Downloads
157
Readme
winstonflight
A winston wrapper to enable adding transports by config
Example
const transports = [{
"type": "file",
"options": {
"level": "error",
"filename": "error.log"
}
}, {
"type": "daily-rotate-file",
"options": {
level: 'info',
"filename": "bi-%DATE%.log",
"datePattern": "YYYYMMDD"
}
}];
const logger = winston.createLogger({
level: 'info',
transports: winstonFlight(winston, transports)
});
License
MIT