diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-05-07 15:41:20 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-05-07 15:41:20 +0200 |
commit | f1dae018681936b556b2496b7f2d872c004cfda3 (patch) | |
tree | 1aff225a41c4543fb18d965b690b7258f4e57472 /server/helpers | |
parent | 0ae6a09d40fd30c86a2e0bd953830020c56045cd (diff) | |
download | PeerTube-f1dae018681936b556b2496b7f2d872c004cfda3.tar.gz PeerTube-f1dae018681936b556b2496b7f2d872c004cfda3.tar.zst PeerTube-f1dae018681936b556b2496b7f2d872c004cfda3.zip |
Add label (host + port) to logger
Diffstat (limited to 'server/helpers')
-rw-r--r-- | server/helpers/logger.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/server/helpers/logger.js b/server/helpers/logger.js index 4ff61380b..8ae90a4b2 100644 --- a/server/helpers/logger.js +++ b/server/helpers/logger.js | |||
@@ -8,6 +8,7 @@ const winston = require('winston') | |||
8 | winston.emitErrs = true | 8 | winston.emitErrs = true |
9 | 9 | ||
10 | const logDir = path.join(__dirname, '..', '..', config.get('storage.logs')) | 10 | const logDir = path.join(__dirname, '..', '..', config.get('storage.logs')) |
11 | const label = config.get('webserver.host') + ':' + config.get('webserver.port') | ||
11 | 12 | ||
12 | // Create the directory if it does not exist | 13 | // Create the directory if it does not exist |
13 | mkdirp.sync(logDir) | 14 | mkdirp.sync(logDir) |
@@ -25,6 +26,7 @@ const logger = new winston.Logger({ | |||
25 | }), | 26 | }), |
26 | new winston.transports.Console({ | 27 | new winston.transports.Console({ |
27 | level: 'debug', | 28 | level: 'debug', |
29 | label: label, | ||
28 | handleExceptions: true, | 30 | handleExceptions: true, |
29 | humanReadableUnhandledException: true, | 31 | humanReadableUnhandledException: true, |
30 | json: false, | 32 | json: false, |