{"action":"opened","issue":{"url":"https://api.github.com/repos/NLog/NLog/issues/2558","repository_url":"https://api.github.com/repos/NLog/NLog","labels_url":"https://api.github.com/repos/NLog/NLog/issues/2558/labels{/name}","comments_url":"https://api.github.com/repos/NLog/NLog/issues/2558/comments","events_url":"https://api.github.com/repos/NLog/NLog/issues/2558/events","html_url":"https://github.com/NLog/NLog/issues/2558","id":293832509,"number":2558,"title":"NLogTraceListener ignores nlog async wrapper","user":{"login":"Ka-Marius","id":24824595,"avatar_url":"https://avatars2.githubusercontent.com/u/24824595?v=4","gravatar_id":"","url":"https://api.github.com/users/Ka-Marius","html_url":"https://github.com/Ka-Marius","followers_url":"https://api.github.com/users/Ka-Marius/followers","following_url":"https://api.github.com/users/Ka-Marius/following{/other_user}","gists_url":"https://api.github.com/users/Ka-Marius/gists{/gist_id}","starred_url":"https://api.github.com/users/Ka-Marius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ka-Marius/subscriptions","organizations_url":"https://api.github.com/users/Ka-Marius/orgs","repos_url":"https://api.github.com/users/Ka-Marius/repos","events_url":"https://api.github.com/users/Ka-Marius/events{/privacy}","received_events_url":"https://api.github.com/users/Ka-Marius/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-02T09:57:54Z","updated_at":"2018-02-02T09:57:54Z","closed_at":null,"author_association":"NONE","body":"Hi, I use ASMX web service (.NET Framework 4.5.2) with nlog (4.4.12). I log asmx events successfully.\r\nPart of web.config:\r\n`<system.diagnostics>\r\n    <trace autoflush=\"true\" />\r\n    <sources>\r\n        <source name=\"System.Web.Services.Asmx\">\r\n            <listeners>\r\n                <add name=\"nlog\" type=\"NLog.NLogTraceListener, NLog\" />\r\n            </listeners>\r\n        </source>\r\n    </sources>\r\n    <switches>\r\n        <add name=\"System.Web.Services.Asmx\" value=\"All\" />\r\n    </switches>\r\n</system.diagnostics>`\r\n\r\nI use asyncWrapper in my nlog.config:\r\n`<targets>\r\n    <target name=\"AsyncTarget\" xsi:type=\"AsyncWrapper\">\r\n        <target xsi:type=\"File\" fileName=\"//192.168.0.5/Logs/file.log\" layout=\"${message}\"/>\r\n    </target>\r\n</targets>`\r\n\r\n`<rules>\r\n    <logger name=\"*\" writeTo=\"AsyncTarget\"/>\r\n</rules>`\r\n\r\nAll logs are logged successfully. **10 requests** (simulated at the same time) **takes about 1 second**.\r\n\r\n**The problem is when the log target IP is unreachable. Then the 10 requests** (simulated at the same tame) **takes about 10 second.**\r\n\r\n**It seems like async wrapper is not working.**\r\n\r\nThe problem is gone when I change NLog.NLogTraceListener listener to System.Diagnostics.TextWriterTraceListener in my web.config. Then the 10 request takes about 1 second (when the log target IP is unreachable). But I need to use NLog.\r\n\r\nThe problem is gone when I disable asmx loging from web.config an log only with nlog methods in code, then 10 requests takes about 1 second (when the log target IP is unreachable) and async wrapper works. But I need to use asmx source log.\r\n\r\nDo you have any ideas how to solve this problem?"}}
{"actor":{"display_login":"Ka-Marius"}}