aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/logger.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/logger.js')
-rw-r--r--src/logger.js40
1 files changed, 0 insertions, 40 deletions
diff --git a/src/logger.js b/src/logger.js
deleted file mode 100644
index 850af10cb..000000000
--- a/src/logger.js
+++ /dev/null
@@ -1,40 +0,0 @@
1;(function () {
2 // Thanks http://tostring.it/2014/06/23/advanced-logging-with-nodejs/
3 'use strict'
4
5 var config = require('config')
6 var winston = require('winston')
7
8 var logDir = __dirname + '/../' + config.get('storage.logs')
9
10 winston.emitErrs = true
11
12 var logger = new winston.Logger({
13 transports: [
14 new winston.transports.File({
15 level: 'debug',
16 filename: logDir + '/all-logs.log',
17 handleExceptions: true,
18 json: true,
19 maxsize: 5242880,
20 maxFiles: 5,
21 colorize: false
22 }),
23 new winston.transports.Console({
24 level: 'debug',
25 handleExceptions: true,
26 humanReadableUnhandledException: true,
27 json: false,
28 colorize: true
29 })
30 ],
31 exitOnError: true
32 })
33
34 module.exports = logger
35 module.exports.stream = {
36 write: function (message, encoding) {
37 logger.info(message)
38 }
39 }
40})()