{"action":"created","issue":{"url":"https://api.github.com/repos/NLog/NLog.Extensions.Logging/issues/63","repository_url":"https://api.github.com/repos/NLog/NLog.Extensions.Logging","labels_url":"https://api.github.com/repos/NLog/NLog.Extensions.Logging/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/NLog/NLog.Extensions.Logging/issues/63/comments","events_url":"https://api.github.com/repos/NLog/NLog.Extensions.Logging/issues/63/events","html_url":"https://github.com/NLog/NLog.Extensions.Logging/issues/63","id":174332146,"number":63,"title":"Issue: Archiving doesn't work on .Net Core Centos deploy","user":{"login":"ahartlin","id":21367925,"avatar_url":"https://avatars.githubusercontent.com/u/21367925?v=3","gravatar_id":"","url":"https://api.github.com/users/ahartlin","html_url":"https://github.com/ahartlin","followers_url":"https://api.github.com/users/ahartlin/followers","following_url":"https://api.github.com/users/ahartlin/following{/other_user}","gists_url":"https://api.github.com/users/ahartlin/gists{/gist_id}","starred_url":"https://api.github.com/users/ahartlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahartlin/subscriptions","organizations_url":"https://api.github.com/users/ahartlin/orgs","repos_url":"https://api.github.com/users/ahartlin/repos","events_url":"https://api.github.com/users/ahartlin/events{/privacy}","received_events_url":"https://api.github.com/users/ahartlin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-08-31T17:30:15Z","updated_at":"2016-08-31T23:35:53Z","closed_at":null,"body":"*To reproduce*\r\n\r\n1. create a basic .net core Web API application\r\n2. add NLog.Extensions.Logging\r\n2. configure logging for archiving, as follows\r\n```xml\r\n<?xml version=\"1.0\"?>\r\n<nlog  autoReload=\"true\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\r\n  <variable name=\"DefaultLayout\"\r\n          value=\"${longdate} [${threadid}][${callsite}] ${level:upperCase=true}: ${message} ${ExceptionFormat}\" />\r\n  <targets async=\"true\">\r\n    <target name=\"DefaultFileTarget\"\r\n            xsi:type=\"File\"\r\n            fileName=\"${basedir}/logs/feedapi.current.log\"\r\n            layout=\"${DefaultLayout}\"\r\n            archiveEvery=\"Day\"\r\n            archiveFileName=\"${basedir}/logs/api.{##}.log\"\r\n            archiveNumbering=\"DateAndSequence\"\r\n            archiveDateFormat=\"yyyyMMdd\"\r\n            archiveAboveSize=\"50000000\"\r\n            maxArchiveFiles=\"50\" />\r\n  </targets>\r\n  <rules>\r\n    <logger name=\"*\" minlevel=\"Debug\" writeTo=\"DefaultFileTarget\" />\r\n  </rules>\r\n</nlog>\r\n```\r\n4. Set up application logging as follows:\r\n`        [HttpGet] \r\n        public string Get()\r\n        {\r\n            _log.Info(\"Hello world\");\r\n            return \"Hello world\";\r\n        }`\r\n5. Deploy to a Centos machine. I used Apache set up as a reverse proxy as the front end, and deployed the application simply by executing dotnet restore -> dotnet run in its root directory..\r\n\r\n6. Get an API client to call the Get method you just created a few times in a row\r\n\r\n*Expected behavior*\r\n* Hello World written multiple times to the same log file\r\n\r\n*Actual behavior*\r\n* As many log files created as GET requests made. NLog archives with every new log entry.\r\n\r\n*Notes* \r\n\r\nThis issue doesn't occur on my Windows dev box. NLog.Extensions.Logging works fine there. \r\n\r\nI'm not sure whether this issue belongs to NLog.Extensions or to Dotnet Core, but I thought it would be worth bringing it to your attention.\r\n\r\nThanks! : )"},"comment":{"url":"https://api.github.com/repos/NLog/NLog.Extensions.Logging/issues/comments/243934432","html_url":"https://github.com/NLog/NLog.Extensions.Logging/issues/63#issuecomment-243934432","issue_url":"https://api.github.com/repos/NLog/NLog.Extensions.Logging/issues/63","id":243934432,"user":{"login":"ahartlin","id":21367925,"avatar_url":"https://avatars.githubusercontent.com/u/21367925?v=3","gravatar_id":"","url":"https://api.github.com/users/ahartlin","html_url":"https://github.com/ahartlin","followers_url":"https://api.github.com/users/ahartlin/followers","following_url":"https://api.github.com/users/ahartlin/following{/other_user}","gists_url":"https://api.github.com/users/ahartlin/gists{/gist_id}","starred_url":"https://api.github.com/users/ahartlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahartlin/subscriptions","organizations_url":"https://api.github.com/users/ahartlin/orgs","repos_url":"https://api.github.com/users/ahartlin/repos","events_url":"https://api.github.com/users/ahartlin/events{/privacy}","received_events_url":"https://api.github.com/users/ahartlin/received_events","type":"User","site_admin":false},"created_at":"2016-08-31T23:35:53Z","updated_at":"2016-08-31T23:35:53Z","body":"Here are the interesting tidbits i found by searching for 'archive':\r\n\r\n2016-08-31 20:05:02.0280 Debug Setting 'FileTarget.archiveEvery' to 'Day'\r\n2016-08-31 20:05:02.0280 Debug Setting 'FileTarget.archiveFileName' to '/logz/feedapi.{##}.log'\r\n2016-08-31 20:05:02.0280 Debug Setting 'FileTarget.archiveNumbering' to 'DateAndSequence'\r\n2016-08-31 20:05:02.0280 Debug Setting 'FileTarget.archiveDateFormat' to 'yyyyMMdd'\r\n2016-08-31 20:05:02.0280 Debug Setting 'FileTarget.archiveAboveSize' to '50000000'\r\n2016-08-31 20:05:02.0280 Debug Setting 'FileTarget.maxArchiveFiles' to '50'\r\n\r\n2016-08-31 20:05:03.9181 Trace Calculating archive date. Last write time: 08/31/2016 20:05:02; Previous log event time: 08/31/2016 20:05:02\r\n2016-08-31 20:05:03.9181 Trace Using previous log event time (is more recent)\r\n2016-08-31 20:05:03.9208 Trace AsyncWrapper 'DumpAllMessages': Flushing 100 events.\r\n2016-08-31 20:05:03.9295 Info Archiving /logz/feedapi.current.log to /logz/feedapi.20160831.00.log\r\n\r\n2016-08-31 20:05:05.3850 Trace Calculating archive date. Last write time: 08/31/2016 20:05:03; Previous log event time: 08/31/2016 20:05:03\r\n2016-08-31 20:05:05.3850 Trace Using previous log event time (is more recent)\r\n2016-08-31 20:05:05.3876 Info Archiving /logz/feedapi.current.log to /logz/feedapi.20160831.01.log\r\n2016-08-31 20:05:05.3876 Trace Opening /logz/feedapi.current.log with allowFileSharedWriting=False"}}
{"actor":{"display_login":"ahartlin"}}