Add label (host + port) to logger
This commit is contained in:
parent
0ae6a09d40
commit
f1dae01868
1 changed files with 2 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue