{"action":"created","issue":{"url":"https://api.github.com/repos/NLog/NLog/issues/1571","repository_url":"https://api.github.com/repos/NLog/NLog","labels_url":"https://api.github.com/repos/NLog/NLog/issues/1571/labels{/name}","comments_url":"https://api.github.com/repos/NLog/NLog/issues/1571/comments","events_url":"https://api.github.com/repos/NLog/NLog/issues/1571/events","html_url":"https://github.com/NLog/NLog/issues/1571","id":168167139,"number":1571,"title":"Zombie file handles when using keepFileOpen=\"true\" and date/time in logfile name","user":{"login":"breischl","id":93974,"avatar_url":"https://avatars.githubusercontent.com/u/93974?v=3","gravatar_id":"","url":"https://api.github.com/users/breischl","html_url":"https://github.com/breischl","followers_url":"https://api.github.com/users/breischl/followers","following_url":"https://api.github.com/users/breischl/following{/other_user}","gists_url":"https://api.github.com/users/breischl/gists{/gist_id}","starred_url":"https://api.github.com/users/breischl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/breischl/subscriptions","organizations_url":"https://api.github.com/users/breischl/orgs","repos_url":"https://api.github.com/users/breischl/repos","events_url":"https://api.github.com/users/breischl/events{/privacy}","received_events_url":"https://api.github.com/users/breischl/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NLog/NLog/labels/file-target","name":"file-target","color":"ffffff"}],"state":"open","locked":false,"assignee":{"login":"304NotModified","id":5808377,"avatar_url":"https://avatars.githubusercontent.com/u/5808377?v=3","gravatar_id":"","url":"https://api.github.com/users/304NotModified","html_url":"https://github.com/304NotModified","followers_url":"https://api.github.com/users/304NotModified/followers","following_url":"https://api.github.com/users/304NotModified/following{/other_user}","gists_url":"https://api.github.com/users/304NotModified/gists{/gist_id}","starred_url":"https://api.github.com/users/304NotModified/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/304NotModified/subscriptions","organizations_url":"https://api.github.com/users/304NotModified/orgs","repos_url":"https://api.github.com/users/304NotModified/repos","events_url":"https://api.github.com/users/304NotModified/events{/privacy}","received_events_url":"https://api.github.com/users/304NotModified/received_events","type":"User","site_admin":false},"assignees":[{"login":"304NotModified","id":5808377,"avatar_url":"https://avatars.githubusercontent.com/u/5808377?v=3","gravatar_id":"","url":"https://api.github.com/users/304NotModified","html_url":"https://github.com/304NotModified","followers_url":"https://api.github.com/users/304NotModified/followers","following_url":"https://api.github.com/users/304NotModified/following{/other_user}","gists_url":"https://api.github.com/users/304NotModified/gists{/gist_id}","starred_url":"https://api.github.com/users/304NotModified/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/304NotModified/subscriptions","organizations_url":"https://api.github.com/users/304NotModified/orgs","repos_url":"https://api.github.com/users/304NotModified/repos","events_url":"https://api.github.com/users/304NotModified/events{/privacy}","received_events_url":"https://api.github.com/users/304NotModified/received_events","type":"User","site_admin":false}],"milestone":null,"comments":10,"created_at":"2016-07-28T18:42:32Z","updated_at":"2016-08-01T19:48:31Z","closed_at":null,"body":"**Summary**: If you configure a FileTarget with the `keepFileOpen=\"true\"` option and also use a date or datetime pattern in the filename, then the files are never closed properly. This happens even if file archiving is enabled, as long as the archiving time period is equal to the precision in the file name (eg, daily archive and the filename contains the date but not time).\r\n\r\n**Type**: Bug\r\n**NLog version**: ~~4.2.3~~ 4.3.6. Also tested in 3.1.0.\r\n**Platform**: .NET 4.6, Windows 10\r\n\r\n- What is the current result? \r\nLogfiles that are no longer in use still have open file handles, which prevents operations on them such as deleting them. \r\n\r\n- What is the expected result?\r\nFile handles should be closed when logfile is no longer in use. \r\n\r\n- Did you checked the [Internal log](https://github.com/NLog/NLog/wiki/Internal-Logging)?\r\nYes, it does not indicate that the old files are ever closed. \r\n\r\n- Please post full exception details (message, stacktrace, inner exceptions)\r\nNo exceptions\r\n\r\n- Are there any workarounds? \r\nYes, don't use the combination of options that provoke the problem.\r\n\r\n- Is there a version in which it did worked? \r\nNot that I know of - I tried ~~4.2.3~~ 4.3.6 and 3.1.0\r\n\r\n- Can you help us by writing an unit test?\r\nNo, but I did write a (slightly manual) repro. See [attached zipfile](https://github.com/NLog/NLog/files/389116/LogRollingTest.zip) or [this repo](https://github.com/breischl/LogRollingTest/tree/master).\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/NLog/NLog/issues/comments/236686770","html_url":"https://github.com/NLog/NLog/issues/1571#issuecomment-236686770","issue_url":"https://api.github.com/repos/NLog/NLog/issues/1571","id":236686770,"user":{"login":"304NotModified","id":5808377,"avatar_url":"https://avatars.githubusercontent.com/u/5808377?v=3","gravatar_id":"","url":"https://api.github.com/users/304NotModified","html_url":"https://github.com/304NotModified","followers_url":"https://api.github.com/users/304NotModified/followers","following_url":"https://api.github.com/users/304NotModified/following{/other_user}","gists_url":"https://api.github.com/users/304NotModified/gists{/gist_id}","starred_url":"https://api.github.com/users/304NotModified/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/304NotModified/subscriptions","organizations_url":"https://api.github.com/users/304NotModified/orgs","repos_url":"https://api.github.com/users/304NotModified/repos","events_url":"https://api.github.com/users/304NotModified/events{/privacy}","received_events_url":"https://api.github.com/users/304NotModified/received_events","type":"User","site_admin":false},"created_at":"2016-08-01T19:48:31Z","updated_at":"2016-08-01T19:48:31Z","body":"Can you post a screenprint of what you're seeing?"}}
{"actor":{"display_login":"304NotModified"}}