2012-02-07 05:34:04 +00:00
|
|
|
// See how bunyan behaves with an un-stringify-able object.
|
2012-06-05 06:19:39 +00:00
|
|
|
var Logger = require('../lib/bunyan');
|
2012-02-07 05:34:04 +00:00
|
|
|
|
2012-06-05 06:19:39 +00:00
|
|
|
var log = new Logger({src: true, name: 'foo'});
|
2012-02-07 05:34:04 +00:00
|
|
|
|
|
|
|
// Make a circular object (cannot be JSON-ified).
|
|
|
|
var myobj = {
|
2013-03-29 00:42:32 +00:00
|
|
|
foo: 'bar'
|
2012-02-07 05:34:04 +00:00
|
|
|
};
|
|
|
|
myobj.myobj = myobj;
|
|
|
|
|
2012-06-05 06:19:39 +00:00
|
|
|
log.info({obj: myobj}, 'hi there'); // <--- here
|