aboutsummaryrefslogtreecommitdiffhomepage
path: root/helpers/logger.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-02-07 10:39:37 +0100
committerChocobozzz <florian.bigard@gmail.com>2016-02-07 10:39:37 +0100
commitb3077e417056f18225957f65419b87de72117fe3 (patch)
treebe00437c83175ca09b184df6fb21ffe149e11ff8 /helpers/logger.js
parentc5a8be2b6282d2042e469e1b7c1e7ce8795c026f (diff)
downloadPeerTube-b3077e417056f18225957f65419b87de72117fe3.tar.gz
PeerTube-b3077e417056f18225957f65419b87de72117fe3.tar.zst
PeerTube-b3077e417056f18225957f65419b87de72117fe3.zip
Standard v6
Diffstat (limited to 'helpers/logger.js')
-rw-r--r--helpers/logger.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/helpers/logger.js b/helpers/logger.js
index fa5b53708..436091730 100644
--- a/helpers/logger.js
+++ b/helpers/logger.js
@@ -3,15 +3,16 @@
3 'use strict' 3 'use strict'
4 4
5 var config = require('config') 5 var config = require('config')
6 var path = require('path')
6 var winston = require('winston') 7 var winston = require('winston')
7 winston.emitErrs = true 8 winston.emitErrs = true
8 9
9 var logDir = __dirname + '/../' + config.get('storage.logs') 10 var logDir = path.join(__dirname, '..', config.get('storage.logs'))
10 var logger = new winston.Logger({ 11 var logger = new winston.Logger({
11 transports: [ 12 transports: [
12 new winston.transports.File({ 13 new winston.transports.File({
13 level: 'debug', 14 level: 'debug',
14 filename: logDir + '/all-logs.log', 15 filename: path.join(logDir, 'all-logs.log'),
15 handleExceptions: true, 16 handleExceptions: true,
16 json: true, 17 json: true,
17 maxsize: 5242880, 18 maxsize: 5242880,