Skip to content
This repository has been archived by the owner on Sep 2, 2023. It is now read-only.

Commit

Permalink
Merge pull request #310 from clark800/fix/logger
Browse files Browse the repository at this point in the history
Make api logger print stack trace even in NODE_ENV=test
  • Loading branch information
alandotcom committed Mar 10, 2015
2 parents 4813aad + 2a33712 commit 8101bae
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
11 changes: 9 additions & 2 deletions api/lib/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,20 @@ var logger = new winston.Logger({
prettyPrint: true,
colorize: true,
timestamp: true,
handleExceptions: true,
handleExceptions: false,
logLevel: 'info',
showLevel: true,
silent: config.get('NODE_ENV') === 'test'
})
],
exitOnError: false
exceptionHandlers: [
new winston.transports.Console({
prettyPrint: true,
colorize: true,
timestamp: true
})
],
exitOnError: true
});

exports.logger = logger;
11 changes: 9 additions & 2 deletions server/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,21 @@ var logger = exports.logger = new winston.Logger({
new winston.transports.Console({
prettyPrint: true,
colorize: true,
handleExceptions: true,
handleExceptions: false,
level: 'info',
showLevel: true,
timestamp: true,
silent: config.get('NODE_ENV') === 'test'
})
],
exitOnError: false
exceptionHandlers: [
new winston.transports.Console({
prettyPrint: true,
colorize: true,
timestamp: true
})
],
exitOnError: true
});

/**
Expand Down

0 comments on commit 8101bae

Please sign in to comment.