{"action":"created","issue":{"url":"https://api.github.com/repos/NLog/NLog.Web/issues/175","repository_url":"https://api.github.com/repos/NLog/NLog.Web","labels_url":"https://api.github.com/repos/NLog/NLog.Web/issues/175/labels{/name}","comments_url":"https://api.github.com/repos/NLog/NLog.Web/issues/175/comments","events_url":"https://api.github.com/repos/NLog/NLog.Web/issues/175/events","html_url":"https://github.com/NLog/NLog.Web/issues/175","id":260750835,"number":175,"title":".NET Core 2.0: Not getting all my log messages","user":{"login":"sarchibald-mdsol","id":28965834,"avatar_url":"https://avatars3.githubusercontent.com/u/28965834?v=4","gravatar_id":"","url":"https://api.github.com/users/sarchibald-mdsol","html_url":"https://github.com/sarchibald-mdsol","followers_url":"https://api.github.com/users/sarchibald-mdsol/followers","following_url":"https://api.github.com/users/sarchibald-mdsol/following{/other_user}","gists_url":"https://api.github.com/users/sarchibald-mdsol/gists{/gist_id}","starred_url":"https://api.github.com/users/sarchibald-mdsol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarchibald-mdsol/subscriptions","organizations_url":"https://api.github.com/users/sarchibald-mdsol/orgs","repos_url":"https://api.github.com/users/sarchibald-mdsol/repos","events_url":"https://api.github.com/users/sarchibald-mdsol/events{/privacy}","received_events_url":"https://api.github.com/users/sarchibald-mdsol/received_events","type":"User","site_admin":false},"labels":[{"id":703726237,"url":"https://api.github.com/repos/NLog/NLog.Web/labels/ASP.NET%20Core%202%20/%20.NET%20Core%202","name":"ASP.NET Core 2 / .NET Core 2","color":"fbca04","default":false},{"id":172374046,"url":"https://api.github.com/repos/NLog/NLog.Web/labels/duplicate","name":"duplicate","color":"cccccc","default":true},{"id":172374050,"url":"https://api.github.com/repos/NLog/NLog.Web/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-09-26T20:00:30Z","updated_at":"2017-09-26T22:35:15Z","closed_at":"2017-09-26T20:32:52Z","author_association":"NONE","body":"I'm using .net core 2.0 and Visual Studio 2017. I've installed the latest version of NLog.Web.AspNetCore(4.4.1). \r\n\r\nMy nlog.config is:\r\n```\r\n<?xml version=\"1.0\" encoding=\"utf-8\" ?>\r\n<nlog xmlns=\"http://www.nlog-project.org/schemas/NLog.xsd\"\r\n\t  xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\r\n\t  autoReload=\"true\"\r\n\t  internalLogLevel=\"Info\"\r\n\t  internalLogFile=\"c:\\logs\\internal-nlog.log\">\r\n\t<!-- Load the ASP.NET Core plugin -->\r\n\t<extensions>\r\n\t\t<add assembly=\"NLog.Web.AspNetCore\"/>\r\n\t</extensions>\r\n\t<!-- the targets to write to -->\r\n\t<targets>\r\n\t\t<!-- write logs to file -->\r\n\t\t<target xsi:type=\"File\" name=\"allfile\" fileName=\"c:\\logs\\cdcdashboard.${shortdate}.log\"\r\n\t\t\t\t\tlayout=\"${longdate}|${event-properties:item=EventId.Id}|${uppercase:${level}}|${message} ${exception}\" />\r\n\t\t<!-- write to the void aka just remove -->\r\n\t\t<target xsi:type=\"Null\" name=\"blackhole\" />\r\n\t</targets>\r\n\t<!-- rules to map from logger name to target -->\r\n\t<rules>\r\n\t\t<!--All logs, including from Microsoft-->\r\n\t\t<logger name=\"*\" minlevel=\"Trace\" writeTo=\"allfile\" />\r\n\t\t<!--Skip Microsoft logs and so log only own logs-->\r\n\t\t<logger name=\"Microsoft.*\" minlevel=\"Trace\" writeTo=\"blackhole\" final=\"true\" />\r\n\t</rules>\r\n</nlog>\r\n```\r\n\r\nI'm getting all the Microsoft log entries as expected, but none of my custom log items.\r\nHere's the relevant code: \r\n```\r\nusing System.Web;\r\nusing CDCDashboard.Domain.Models;\r\nusing CDCDashboard.Mappers;\r\nusing CDCDashboard.Service;\r\nusing CDCDashboard.ViewModel;\r\nusing Microsoft.Extensions.Logging;\r\n\r\nnamespace CDCDashboardWeb.Controllers\r\n{\r\n\tpublic class RaveCDCEstimationsController : BaseController<RaveCdcEstimations>\r\n\t{\r\n\t\tRaveCDCEstimationsService service;\r\n\t\tpublic RaveCDCEstimationsController(NeoHelperContext dbContext, ILogger<RaveCdcEstimations> logger) : base(dbContext){\r\n\t\t\tservice = new RaveCDCEstimationsService(dbContext);\r\n\t\t\tthis.logger = logger;\r\n\t\t}\r\n\r\n\t\t[Microsoft.AspNetCore.Mvc.Route(\"api/GetDatabaseGB\")]\r\n\t\tpublic BaseValueStatCollectionViewModel GetDatabaseGB(string xAxisLabel, string yAxisLabel)\r\n\t\t{\r\n\t\t\tvar result = new BaseValueStatCollectionViewModel();\r\n\t\t\tvar rawQryString = this.Request.QueryString.Value;\r\n\t\t\tvar qryCollection = HttpUtility.ParseQueryString(rawQryString);\r\n\t\t\tvar nodes = service.Get(qryCollection);\r\n\t\t\tresult = MapRaveCdcEstimations.MapToBaseValueStatCollectionVM(nodes, xAxisLabel, yAxisLabel);\r\n\t\t\tlogger.LogDebug($\"Exiting:: returning {result.NodeStats.Count.ToString()} nodes\");\r\n\t\t\treturn result;\r\n\t\t}\r\n\t}\r\n}\r\n```\r\nI'm not seeing anything from ```logger.LogDebug(\"Entering\", null);``` even though I can step through that line successfully in debug.\r\nHere's what does show up in my log file:\r\n```\r\n2017-09-26 12:48:26.4453|11|FATAL|Hosting startup assembly exception Startup assembly Microsoft.AspNetCore.ApplicationInsights.HostingStartup failed to execute. See the inner exception for more details.\r\n2017-09-26 12:48:26.6492|1|INFO|Request starting HTTP/1.1 GET http://localhost:4303/api/GetDatabaseGB?$top=150&$orderby=DatabaseSizeGB%20desc   \r\n2017-09-26 12:48:26.9730|1|INFO|Executing action method CDCDashboardWeb.Controllers.RaveCDCEstimationsController.GetDatabaseGB (CDCDashboardWeb) with arguments (, ) - ModelState is Valid \r\n2017-09-26 12:48:27.5292|1|INFO|Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. \r\n2017-09-26 12:48:27.5876|2|INFO|Executed action CDCDashboardWeb.Controllers.RaveCDCEstimationsController.GetDatabaseGB (CDCDashboardWeb) in 737.1523ms \r\n2017-09-26 12:48:27.5876|2|INFO|Request finished in 945.4005ms 200 application/json; charset=utf-8 \r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/NLog/NLog.Web/issues/comments/332355910","html_url":"https://github.com/NLog/NLog.Web/issues/175#issuecomment-332355910","issue_url":"https://api.github.com/repos/NLog/NLog.Web/issues/175","id":332355910,"user":{"login":"304NotModified","id":5808377,"avatar_url":"https://avatars1.githubusercontent.com/u/5808377?v=4","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":"2017-09-26T22:35:15Z","updated_at":"2017-09-26T22:35:15Z","author_association":"OWNER","body":"with the blackhole construction in NLog's config"}}
{"actor":{"display_login":"304NotModified"}}