Add label (host + port) to logger
This commit is contained in:
parent
0ae6a09d40
commit
f1dae01868
|
@ -8,6 +8,7 @@ const winston = require('winston')
|
||||||
winston.emitErrs = true
|
winston.emitErrs = true
|
||||||
|
|
||||||
const logDir = path.join(__dirname, '..', '..', config.get('storage.logs'))
|
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
|
// Create the directory if it does not exist
|
||||||
mkdirp.sync(logDir)
|
mkdirp.sync(logDir)
|
||||||
|
@ -25,6 +26,7 @@ const logger = new winston.Logger({
|
||||||
}),
|
}),
|
||||||
new winston.transports.Console({
|
new winston.transports.Console({
|
||||||
level: 'debug',
|
level: 'debug',
|
||||||
|
label: label,
|
||||||
handleExceptions: true,
|
handleExceptions: true,
|
||||||
humanReadableUnhandledException: true,
|
humanReadableUnhandledException: true,
|
||||||
json: false,
|
json: false,
|
||||||
|
|
Loading…
Reference in New Issue