diff options
Diffstat (limited to 'helpers/logger.js')
-rw-r--r-- | helpers/logger.js | 5 |
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, |