-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from trayio/CPS-206/f/threadneedle-1-12-0-release
CPS-206: Threadneedle 1.12.0 release
- Loading branch information
Showing
7 changed files
with
1,404 additions
and
371 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
var winston = require('winston'); | ||
const winston = require('winston'); | ||
|
||
const logger = new winston.Logger({}); | ||
|
||
var logger = new (winston.Logger)({}); | ||
const enableLogs = process.env.NODE_ENV === 'development' || | ||
!!process.env.THREADNEEDLE_ENABLE_LOGS; | ||
|
||
// Log into the console | ||
logger.add(winston.transports.Console, { | ||
colorize: true, | ||
level: (process.env.NODE_ENV === 'development') ? 'info' : 'warning' | ||
level: enableLogs | ||
? 'info' | ||
: 'warning' | ||
}); | ||
|
||
logger.setLevels({ | ||
emerg: 0, | ||
alert: 1, | ||
crit: 2, | ||
error: 3, // tweaked from default | ||
warning: 4, | ||
notice: 5, | ||
info: 6, | ||
debug: 7 // moved down | ||
emerg: 0, | ||
alert: 1, | ||
crit: 2, | ||
error: 3, // tweaked from default | ||
warning: 4, | ||
notice: 5, | ||
info: 6, | ||
debug: 7 // moved down | ||
}); | ||
|
||
module.exports = logger; |
Oops, something went wrong.