Skip to content

Commit

Permalink
Create logger.js
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Aug 4, 2024
1 parent aac9983 commit 032f4a9
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions blockchain_integration/pi_network/cognita/kyc/utils/logger.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const winston = require('winston');

const logger = winston.createLogger({
level: 'info',
format: winston.format.json(),
transports: [
new winston.transports.Console({
format: winston.format.simple(),
}),
new winston.transports.File({
filename: 'logs/error.log',
level: 'error',
}),
new winston.transports.File({
filename: 'logs/info.log',
level: 'info',
}),
],
});

module.exports = logger;

0 comments on commit 032f4a9

Please sign in to comment.