Permalink
Browse files

Fix debug error on production env

  • Loading branch information...
cristiandouce committed May 3, 2015
1 parent 7e29e2e commit ae5c9d5f09b888e05ba7b02f3da8ca3f7b6193d2
Showing with 5 additions and 4 deletions.
  1. +5 −4 lib/setup/index.js
View
@@ -2,6 +2,7 @@
* Module dependencies.
*/
var debug = require('debug')('njs:setup');
var express = require('express');
var passport = require('passport');
var session = require('express-session');
@@ -48,7 +49,7 @@ module.exports = function configuration (app) {
if (config('env') == 'testing') {
// Log config settigs load
log( 'testing settings' );
debug( 'testing settings' );
}
@@ -60,7 +61,7 @@ module.exports = function configuration (app) {
if (config('env') == 'production') {
// Log config settigs load
log( 'production settings' );
debug( 'production settings' );
/**
* Set `nowww` middleware helper
@@ -151,7 +152,7 @@ module.exports = function configuration (app) {
app.use(function(err, req, res, next) {
// log
console.log('Some odd error: %j', err);
debug('Some odd error: %j', err);
// now let it go
next();
});
@@ -188,4 +189,4 @@ function merge (a, b){
}
}
return a;
};
};

0 comments on commit ae5c9d5

Please sign in to comment.