1
0
Fork 0

Add label (host + port) to logger

This commit is contained in:
Chocobozzz 2016-05-07 15:41:20 +02:00
parent 0ae6a09d40
commit f1dae01868

View file

@ -8,6 +8,7 @@ const winston = require('winston')
winston.emitErrs = true
const logDir = path.join(__dirname, '..', '..', config.get('storage.logs'))
const label = config.get('webserver.host') + ':' + config.get('webserver.port')
// Create the directory if it does not exist
mkdirp.sync(logDir)
@ -25,6 +26,7 @@ const logger = new winston.Logger({
}),
new winston.transports.Console({
level: 'debug',
label: label,
handleExceptions: true,
humanReadableUnhandledException: true,
json: false,