Merge pull request #1002 from jessopb/changelogging

adds timestamp to logging
This commit is contained in:
jessopb 2019-04-18 15:04:00 -04:00 committed by GitHub
commit d84c964ae0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,7 @@ const logger = require('winston');
const config = require('@config/loggerConfig');
const { logLevel } = config;
function configureLogging () {
function configureLogging() {
logger.info('configuring winston logger...');
if (!config) {
return logger.warn('No logger config found');
@ -14,12 +14,12 @@ function configureLogging () {
// configure the winston logger
logger.configure({
transports: [
new (logger.transports.Console)({
level : logLevel || 'debug',
timestamp : false,
colorize : true,
prettyPrint : true,
handleExceptions : true,
new logger.transports.Console({
level: logLevel || 'debug',
timestamp: true,
colorize: true,
prettyPrint: true,
handleExceptions: true,
humanReadableUnhandledException: true,
}),
],