From cda021079ff455cc0fd0eb95a5395fa808ab63d1 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Sat, 30 Jan 2016 17:05:22 +0100 Subject: New directory organization --- src/logger.js | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 src/logger.js (limited to 'src/logger.js') 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 @@ -;(function () { - // Thanks http://tostring.it/2014/06/23/advanced-logging-with-nodejs/ - 'use strict' - - var config = require('config') - var winston = require('winston') - - var logDir = __dirname + '/../' + config.get('storage.logs') - - winston.emitErrs = true - - var logger = new winston.Logger({ - transports: [ - new winston.transports.File({ - level: 'debug', - filename: logDir + '/all-logs.log', - handleExceptions: true, - json: true, - maxsize: 5242880, - maxFiles: 5, - colorize: false - }), - new winston.transports.Console({ - level: 'debug', - handleExceptions: true, - humanReadableUnhandledException: true, - json: false, - colorize: true - }) - ], - exitOnError: true - }) - - module.exports = logger - module.exports.stream = { - write: function (message, encoding) { - logger.info(message) - } - } -})() -- cgit v1.2.3