Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
realized I forgot to add the actual logger
Browse files Browse the repository at this point in the history
  • Loading branch information
lirantal committed Nov 6, 2014
1 parent bf7bcc6 commit d2d4e8c
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions config/logger.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
'use strict';

/**
* Module dependencies.
*/

var morgan = require('morgan');
var config = require('./config');
var fs = require('fs');

/**
* Module init function.
*/
module.exports = {

getLogFormat: function() {
return config.log.format;
},

getLogOptions: function() {
var options = {};

if ('stream' in config.log.options) {
options = {
stream: fs.createWriteStream(process.cwd() + '/' + config.log.options.stream, {flags: 'a'})
};
}

return options;
}

};

0 comments on commit d2d4e8c

Please sign in to comment.