aboutsummaryrefslogtreecommitdiffhomepage
path: root/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'helpers')
-rw-r--r--helpers/logger.js5
-rw-r--r--helpers/peertubeCrypto.js3
2 files changed, 5 insertions, 3 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,
diff --git a/helpers/peertubeCrypto.js b/helpers/peertubeCrypto.js
index 36271dba9..9031f6ae5 100644
--- a/helpers/peertubeCrypto.js
+++ b/helpers/peertubeCrypto.js
@@ -5,11 +5,12 @@
5 var crypto = require('crypto') 5 var crypto = require('crypto')
6 var fs = require('fs') 6 var fs = require('fs')
7 var openssl = require('openssl-wrapper') 7 var openssl = require('openssl-wrapper')
8 var path = require('path')
8 var ursa = require('ursa') 9 var ursa = require('ursa')
9 10
10 var logger = require('./logger') 11 var logger = require('./logger')
11 12
12 var certDir = __dirname + '/../' + config.get('storage.certs') 13 var certDir = path.join(__dirname, '..', config.get('storage.certs'))
13 var algorithm = 'aes-256-ctr' 14 var algorithm = 'aes-256-ctr'
14 15
15 var peertubeCrypto = { 16 var peertubeCrypto = {