aboutsummaryrefslogtreecommitdiffhomepage
path: root/helpers
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
parentc5a8be2b6282d2042e469e1b7c1e7ce8795c026f (diff)
downloadPeerTube-b3077e417056f18225957f65419b87de72117fe3.tar.gz
PeerTube-b3077e417056f18225957f65419b87de72117fe3.tar.zst
PeerTube-b3077e417056f18225957f65419b87de72117fe3.zip
Standard v6
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 = {