Write logs to files
This commit is contained in:
parent
1746d6f31b
commit
29036deb58
@ -2,7 +2,11 @@ import winston from 'winston'
|
|||||||
|
|
||||||
export default winston.createLogger({
|
export default winston.createLogger({
|
||||||
level: 'debug',
|
level: 'debug',
|
||||||
transports: [new winston.transports.Console()],
|
transports: [
|
||||||
|
new winston.transports.Console(),
|
||||||
|
new winston.transports.File({ filename: 'warn.log', level: 'warn' }),
|
||||||
|
new winston.transports.File({ filename: 'combined.log' }),
|
||||||
|
],
|
||||||
format: winston.format.combine(
|
format: winston.format.combine(
|
||||||
winston.format.colorize({ all: true }),
|
winston.format.colorize({ all: true }),
|
||||||
winston.format.simple()
|
winston.format.simple()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user