aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers')
-rw-r--r--server/helpers/logger.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/helpers/logger.js b/server/helpers/logger.js
index d3fce4cc9..4ff61380b 100644
--- a/server/helpers/logger.js
+++ b/server/helpers/logger.js
@@ -2,11 +2,16 @@
2'use strict' 2'use strict'
3 3
4const config = require('config') 4const config = require('config')
5const mkdirp = require('mkdirp')
5const path = require('path') 6const path = require('path')
6const winston = require('winston') 7const winston = require('winston')
7winston.emitErrs = true 8winston.emitErrs = true
8 9
9const logDir = path.join(__dirname, '..', '..', config.get('storage.logs')) 10const logDir = path.join(__dirname, '..', '..', config.get('storage.logs'))
11
12// Create the directory if it does not exist
13mkdirp.sync(logDir)
14
10const logger = new winston.Logger({ 15const logger = new winston.Logger({
11 transports: [ 16 transports: [
12 new winston.transports.File({ 17 new winston.transports.File({