Add label (host + port) to logger

pull/10/head
Chocobozzz 2016-05-07 15:41:20 +02:00
parent 0ae6a09d40
commit f1dae01868
1 changed files with 2 additions and 0 deletions

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,