-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Description
Oddly enough, I ran across this exact same problem testing winston-syslog: winstonjs/winston-syslog#155
If I test bunyan by itself, then this code runs and exits normally:
const bunyan = require('bunyan');
const logger = bunyan.createLogger({
name: 'graylog-syslog-bunyan',
});
logger.error('Test message');
However, when I use this library, the app no longer exits:
const bunyan = require('bunyan');
const bsyslog = require('bunyan-syslog');
const logger = bunyan.createLogger({
name: 'graylog-syslog-bunyan',
streams: [
{
level: 'debug',
type: 'raw',
stream: bsyslog.createBunyanStream({
host: '127.0.0.1',
port: 5140,
}),
},
],
});
logger.error('Test message');
Instead, I have to manually exit:
setTimeout(() => {
process.exit();
}, 500);
Some more information in case it helps:
$ node --version
v14.17.5
$ grep bunyan package.json
"bunyan": "^1.8.15",
"bunyan-syslog": "^0.3.3",
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels