Skip to content

Commit

Permalink
Updated winston dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
akb89 committed Aug 21, 2018
1 parent 2792de6 commit 7c98b30
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
16 changes: 12 additions & 4 deletions logger/logger.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,43 @@
const winston = require('winston');

const warn = new (winston.Logger)({
const myFormat = winston.format.combine(winston.format.timestamp(),
winston.format.colorize(),
winston.format.printf(mess => `[${mess.timestamp}] ${mess.level}: ${mess.message}`));

const warn = winston.createLogger({
transports: [
new (winston.transports.Console)({
format: myFormat,
level: 'warn',
colorize: true,
}),
],
});

const info = new (winston.Logger)({
const info = winston.createLogger({
transports: [
new (winston.transports.Console)({
format: myFormat,
level: 'info',
colorize: true,
}),
],
});

const verbose = new (winston.Logger)({
const verbose = winston.createLogger({
transports: [
new (winston.transports.Console)({
format: myFormat,
level: 'verbose',
colorize: true,
}),
],
});

const debug = new (winston.Logger)({
const debug = winston.createLogger({
transports: [
new (winston.transports.Console)({
format: myFormat,
level: 'debug',
colorize: true,
}),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"mongoose": "^5.0.0",
"noframenet-core": "^5.4.2",
"pm2": "^2.6.1",
"winston": "^2.3.1"
"winston": "^3.0.0"
},
"devDependencies": {
"apidoc": "^0.17.6",
Expand Down

0 comments on commit 7c98b30

Please sign in to comment.