aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-05-07 15:41:20 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-05-07 15:41:20 +0200
commitf1dae018681936b556b2496b7f2d872c004cfda3 (patch)
tree1aff225a41c4543fb18d965b690b7258f4e57472 /server/helpers
parent0ae6a09d40fd30c86a2e0bd953830020c56045cd (diff)
downloadPeerTube-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.js2
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')
8winston.emitErrs = true 8winston.emitErrs = true
9 9
10const logDir = path.join(__dirname, '..', '..', config.get('storage.logs')) 10const logDir = path.join(__dirname, '..', '..', config.get('storage.logs'))
11const 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
13mkdirp.sync(logDir) 14mkdirp.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,