This logging duplication is happening in multiple projects and I am not sure why it's happening.
These two lines are logged:
[2016-01-25T21:28:25.019Z] INFO: SmartConnect/11555 on CACSVML-13295.local (/Users/amills001c/WebstormProjects/lectal_all/algolia/oplog/tailing.js:19): about to start tailing...
[2016-01-25T21:28:25.019Z] INFO: SmartConnect/11555 on CACSVML-13295.local (/Users/amills001c/WebstormProjects/lectal_all/algolia/oplog/tailing.js:19): about to start tailing...
but I know that the call to log this line is not being called twice. This is happening in multiple projects of mine, so I think there is some other problem.
My configuration for using Bunyan is like so:
var bunyan = require('bunyan');
module.exports = bunyan.createLogger({
name: 'Lectal-Logger',
src: true,
streams: [
{
level: 'info',
stream: process.stdout
},
{
level: 'error',
stream: process.stderr
}
]
});
the two duplicate logging entries above are both INFO level - so this should not be a case of stderr and stdout being sent to the same place (console/terminal in this case).
One clue is that if I change
log.info
to
log.debug
in my code, then the duplicate entry problem goes away. So, I might be missing something about how logging levels work.
Anyone have any ideas why I would see duplicate entries?