{"action":"created","issue":{"url":"https://api.github.com/repos/log4js-node/log4js-node/issues/836","repository_url":"https://api.github.com/repos/log4js-node/log4js-node","labels_url":"https://api.github.com/repos/log4js-node/log4js-node/issues/836/labels{/name}","comments_url":"https://api.github.com/repos/log4js-node/log4js-node/issues/836/comments","events_url":"https://api.github.com/repos/log4js-node/log4js-node/issues/836/events","html_url":"https://github.com/log4js-node/log4js-node/issues/836","id":409706896,"node_id":"MDU6SXNzdWU0MDk3MDY4OTY=","number":836,"title":"dateFile appender \"daysToKeep\" not working","user":{"login":"Shinapp","id":30428689,"node_id":"MDQ6VXNlcjMwNDI4Njg5","avatar_url":"https://avatars3.githubusercontent.com/u/30428689?v=4","gravatar_id":"","url":"https://api.github.com/users/Shinapp","html_url":"https://github.com/Shinapp","followers_url":"https://api.github.com/users/Shinapp/followers","following_url":"https://api.github.com/users/Shinapp/following{/other_user}","gists_url":"https://api.github.com/users/Shinapp/gists{/gist_id}","starred_url":"https://api.github.com/users/Shinapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shinapp/subscriptions","organizations_url":"https://api.github.com/users/Shinapp/orgs","repos_url":"https://api.github.com/users/Shinapp/repos","events_url":"https://api.github.com/users/Shinapp/events{/privacy}","received_events_url":"https://api.github.com/users/Shinapp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2019-02-13T09:29:36Z","updated_at":"2019-07-03T07:19:17Z","closed_at":null,"author_association":"NONE","body":"#806 \r\nProblem seems still exists fir log4js 4.0.2\r\n\r\nI have changed local time to test:\r\n1. File not rolled when alwaysIncludePattern set to false\r\n2. Old files not being removed after the \"daysToKeep\"\r\n\r\n├─┬ log4js@4.0.2\r\n│ ├── date-format@2.0.0\r\n│ ├─┬ debug@3.2.6\r\n│ │ └── ms@2.1.1\r\n│ ├── flatted@2.0.0\r\n│ ├── rfdc@1.1.2\r\n│ └─┬ streamroller@1.0.1\r\n│   ├── async@2.6.1 deduped\r\n│   ├── date-format@2.0.0 deduped\r\n│   ├── debug@3.2.6 deduped\r\n│   ├── fs-extra@7.0.1 deduped\r\n│   └── lodash@4.17.11 deduped\r\n\r\nnode v11.5.0"},"comment":{"url":"https://api.github.com/repos/log4js-node/log4js-node/issues/comments/507972542","html_url":"https://github.com/log4js-node/log4js-node/issues/836#issuecomment-507972542","issue_url":"https://api.github.com/repos/log4js-node/log4js-node/issues/836","id":507972542,"node_id":"MDEyOklzc3VlQ29tbWVudDUwNzk3MjU0Mg==","user":{"login":"Shinapp","id":30428689,"node_id":"MDQ6VXNlcjMwNDI4Njg5","avatar_url":"https://avatars3.githubusercontent.com/u/30428689?v=4","gravatar_id":"","url":"https://api.github.com/users/Shinapp","html_url":"https://github.com/Shinapp","followers_url":"https://api.github.com/users/Shinapp/followers","following_url":"https://api.github.com/users/Shinapp/following{/other_user}","gists_url":"https://api.github.com/users/Shinapp/gists{/gist_id}","starred_url":"https://api.github.com/users/Shinapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shinapp/subscriptions","organizations_url":"https://api.github.com/users/Shinapp/orgs","repos_url":"https://api.github.com/users/Shinapp/repos","events_url":"https://api.github.com/users/Shinapp/events{/privacy}","received_events_url":"https://api.github.com/users/Shinapp/received_events","type":"User","site_admin":false},"created_at":"2019-07-03T07:19:17Z","updated_at":"2019-07-03T07:19:17Z","author_association":"NONE","body":"I still have the problem. I tried the code on mac, linux and window.\r\nSeems the problem is in the rolling condition:\r\nstreamroller/lib/RollingFileWriteStream.js line:122\r\n`  _shouldRoll(callback) {\r\n      debug(`in _shouldRoll, pattern = ${this.options.pattern}, currentDate = ${this.state.currentDate}, now = ${newNow()}`);\r\n   if (this.options.pattern && (format(this.options.pattern, this.state.currentDate) !== format(this.options.pattern, newNow()))) {\r\n        this._roll({isNextPeriod: true}, callback);\r\n        return;\r\n      }`\r\n\r\nThe condition is always false and the cleaning mechanism is not triggered.\r\nI tried hard code the condition to true and it is work."}}
{"actor":{"display_login":"Shinapp"}}