Skip to content

Commit

Permalink
[api test] Expose .stack in winston.exception.getAllInfo()
Browse files Browse the repository at this point in the history
  • Loading branch information
indexzero committed Sep 15, 2011
1 parent 1a3494a commit 6872429
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/winston/exception.js
Expand Up @@ -15,7 +15,8 @@ exception.getAllInfo = function (err) {
return {
process: exception.getProcessInfo(),
os: exception.getOsInfo(),
trace: exception.getTrace(err)
trace: exception.getTrace(err),
stack: err.stack.split('\n')
};
};

Expand Down
1 change: 1 addition & 0 deletions test/exception-test.js
Expand Up @@ -36,6 +36,7 @@ vows.describe('winston/exception').addBatch({
topic: winston.exception.getAllInfo(new Error()),
"should have the appropriate info": function (info) {
assert.isObject(info);
assert.isArray(info.stack);
helpers.assertProcessInfo(info.process);
helpers.assertOsInfo(info.os);
helpers.assertTrace(info.trace);
Expand Down

0 comments on commit 6872429

Please sign in to comment.