{"action":"created","issue":{"url":"https://api.github.com/repos/log4js-node/log4js-node/issues/788","repository_url":"https://api.github.com/repos/log4js-node/log4js-node","labels_url":"https://api.github.com/repos/log4js-node/log4js-node/issues/788/labels{/name}","comments_url":"https://api.github.com/repos/log4js-node/log4js-node/issues/788/comments","events_url":"https://api.github.com/repos/log4js-node/log4js-node/issues/788/events","html_url":"https://github.com/log4js-node/log4js-node/issues/788","id":363580503,"node_id":"MDU6SXNzdWUzNjM1ODA1MDM=","number":788,"title":"log4js version 2.10.0 is giving error when shutdown and process Exit called","user":{"login":"DipjayDatta","id":24479912,"node_id":"MDQ6VXNlcjI0NDc5OTEy","avatar_url":"https://avatars3.githubusercontent.com/u/24479912?v=4","gravatar_id":"","url":"https://api.github.com/users/DipjayDatta","html_url":"https://github.com/DipjayDatta","followers_url":"https://api.github.com/users/DipjayDatta/followers","following_url":"https://api.github.com/users/DipjayDatta/following{/other_user}","gists_url":"https://api.github.com/users/DipjayDatta/gists{/gist_id}","starred_url":"https://api.github.com/users/DipjayDatta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DipjayDatta/subscriptions","organizations_url":"https://api.github.com/users/DipjayDatta/orgs","repos_url":"https://api.github.com/users/DipjayDatta/repos","events_url":"https://api.github.com/users/DipjayDatta/events{/privacy}","received_events_url":"https://api.github.com/users/DipjayDatta/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-25T13:32:03Z","updated_at":"2018-10-01T22:04:05Z","closed_at":null,"author_association":"NONE","body":"**code:**\r\nlog4js.shutdown(() => { process.exit(1); });\r\n\r\n**Error:**\r\nlog4js.fileAppender - Writing to file ../logs/ABC.log, error happened Error: write after end\r\nat writeAfterEnd (/node_modules/readable-stream/lib/_stream_writable.js:288:12)\r\nat RollingFileStream.Writable.write (/node_modules/readable-stream/lib/_stream_writable.js:332:20)\r\nat Function.app.shutdown (node_modules/log4js/lib/appenders/file.js:69:12)\r\nat appenders.filter.forEach.a (/node_modules/log4js/lib/log4js.js:273:52)\r\nat Array.forEach (native)\r\nat Object.shutdown (/node_modules/log4js/lib/log4js.js:273:37)\r\nat process.exitHandler (XYZ.js:130:12)\r\nat emitOne (events.js:96:13)\r\nat process.emit (events.js:188:7)\r\nat process.exit (internal/process.js:146:15)"},"comment":{"url":"https://api.github.com/repos/log4js-node/log4js-node/issues/comments/426079563","html_url":"https://github.com/log4js-node/log4js-node/issues/788#issuecomment-426079563","issue_url":"https://api.github.com/repos/log4js-node/log4js-node/issues/788","id":426079563,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNjA3OTU2Mw==","user":{"login":"nomiddlename","id":83909,"node_id":"MDQ6VXNlcjgzOTA5","avatar_url":"https://avatars3.githubusercontent.com/u/83909?v=4","gravatar_id":"","url":"https://api.github.com/users/nomiddlename","html_url":"https://github.com/nomiddlename","followers_url":"https://api.github.com/users/nomiddlename/followers","following_url":"https://api.github.com/users/nomiddlename/following{/other_user}","gists_url":"https://api.github.com/users/nomiddlename/gists{/gist_id}","starred_url":"https://api.github.com/users/nomiddlename/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nomiddlename/subscriptions","organizations_url":"https://api.github.com/users/nomiddlename/orgs","repos_url":"https://api.github.com/users/nomiddlename/repos","events_url":"https://api.github.com/users/nomiddlename/events{/privacy}","received_events_url":"https://api.github.com/users/nomiddlename/received_events","type":"User","site_admin":false},"created_at":"2018-10-01T22:04:05Z","updated_at":"2018-10-01T22:04:05Z","author_association":"COLLABORATOR","body":"This issue might give you more information: #542  - the problem is that process.exit happens synchronously, before the appenders have finished their final writes. You could try adding a setTimeout call around the process.exit and waiting a second or two?"}}
{"actor":{"display_login":"nomiddlename"}}