]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/logger.js
First version with PostgreSQL
[github/Chocobozzz/PeerTube.git] / server / helpers / logger.js
index 590ceaeb6c5be0ef69761166f497ed8a7d8b54ff..281acedb8f3f4152db01c229bb9f54bac947dbed 100644 (file)
@@ -8,7 +8,7 @@ winston.emitErrs = true
 
 const constants = require('../initializers/constants')
 
-const label = constants.CONFIG.WEBSERVER.HOST + ':' + constants.CONFIG.WEBSERVER.PORT
+const label = constants.CONFIG.WEBSERVER.HOSTNAME + ':' + constants.CONFIG.WEBSERVER.PORT
 
 // Create the directory if it does not exist
 mkdirp.sync(constants.CONFIG.STORAGE.LOG_DIR)
@@ -22,7 +22,8 @@ const logger = new winston.Logger({
       json: true,
       maxsize: 5242880,
       maxFiles: 5,
-      colorize: false
+      colorize: false,
+      prettyPrint: true
     }),
     new winston.transports.Console({
       level: 'debug',
@@ -30,7 +31,8 @@ const logger = new winston.Logger({
       handleExceptions: true,
       humanReadableUnhandledException: true,
       json: false,
-      colorize: true
+      colorize: true,
+      prettyPrint: true
     })
   ],
   exitOnError: true