Skip to content

Commit 9f1b866

Browse files
committed
Add logging module
1 parent 56b712e commit 9f1b866

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

scripts/logger.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const { createLogger, format, transports } = require('winston');
2+
3+
const logger = createLogger({
4+
level: 'debug',
5+
format: format.combine(
6+
format.colorize(),
7+
format.simple(),
8+
),
9+
// You can also comment out the line above and uncomment the line below for JSON format
10+
// format: format.json(),
11+
transports: [new transports.Console()]
12+
});
13+
14+
module.exports = logger

0 commit comments

Comments
 (0)