{"action":"created","issue":{"url":"https://api.github.com/repos/NLog/NLog/issues/1158","repository_url":"https://api.github.com/repos/NLog/NLog","labels_url":"https://api.github.com/repos/NLog/NLog/issues/1158/labels{/name}","comments_url":"https://api.github.com/repos/NLog/NLog/issues/1158/comments","events_url":"https://api.github.com/repos/NLog/NLog/issues/1158/events","html_url":"https://github.com/NLog/NLog/issues/1158","id":126168186,"number":1158,"title":"Problem using NLog.Config with Xamarin","user":{"login":"SMavr","id":4476659,"avatar_url":"https://avatars.githubusercontent.com/u/4476659?v=3","gravatar_id":"","url":"https://api.github.com/users/SMavr","html_url":"https://github.com/SMavr","followers_url":"https://api.github.com/users/SMavr/followers","following_url":"https://api.github.com/users/SMavr/following{/other_user}","gists_url":"https://api.github.com/users/SMavr/gists{/gist_id}","starred_url":"https://api.github.com/users/SMavr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SMavr/subscriptions","organizations_url":"https://api.github.com/users/SMavr/orgs","repos_url":"https://api.github.com/users/SMavr/repos","events_url":"https://api.github.com/users/SMavr/events{/privacy}","received_events_url":"https://api.github.com/users/SMavr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NLog/NLog/labels/nlog-configuration","name":"nlog-configuration","color":"ffffff"},{"url":"https://api.github.com/repos/NLog/NLog/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/NLog/NLog/milestones/14","html_url":"https://github.com/NLog/NLog/milestones/4.3","labels_url":"https://api.github.com/repos/NLog/NLog/milestones/14/labels","id":1369256,"number":14,"title":"4.3","description":"Improved exception handling,  Xamarin and Windows Phone 8 support ","creator":{"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},"open_issues":1,"closed_issues":162,"state":"closed","created_at":"2015-10-21T22:23:20Z","updated_at":"2016-08-05T23:45:39Z","due_on":"2016-04-15T22:00:00Z","closed_at":"2016-04-16T12:42:42Z"},"comments":20,"created_at":"2016-01-12T12:23:59Z","updated_at":"2016-10-03T13:38:20Z","closed_at":"2016-02-04T23:02:53Z","body":"I am trying to use the NLog.Config with Xamarin.iOS and Xamarin.Android Projects. \r\nI downloaded the NLog.Config package from nuget and I added inside the NLog.Config file:\r\n```xml\r\n<?xml version=\"1.0\" encoding=\"utf-8\" ?>\r\n<nlog xmlns=\"http://www.nlog-project.org/schemas/NLog.xsd\"\r\n      xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\r\n    <targets>\r\n        <target name=\"console\" xsi:type=\"Console\" />\r\n    </targets>\r\n    <rules>\r\n        <logger name=\"*\" minlevel=\"Info\" writeTo=\"console\" />\r\n    </rules>\r\n</nlog>\r\n```\r\n\r\nand inside the Main\r\n\r\n```c#\r\n\tstatic void Main (string[] args)\r\n\t\t{\r\n\t\t\tLogger logger = LogManager.GetCurrentClassLogger ();\r\n\t\t\tlogger.Trace(\"Sample trace message\");\r\n\t\t\tlogger.Debug(\"Sample debug message\");\r\n\t\t\tlogger.Info(\"Sample informational message\");\r\n\t\t\tlogger.Warn(\"Sample warning message\");\r\n\t\t\tlogger.Error(\"Sample error message\");\r\n\t\t\tlogger.Fatal(\"Sample fatal error message\");\r\n\t\t\t// if you want to use a different Application Delegate class from \"AppDelegate\"\r\n\t\t\t// you can specify it here.\r\n\t\t\tUIApplication.Main (args, null, \"AppDelegate\");\r\n\t\t}\r\n```\r\n\r\nBut it does not work. It seems that the logger doesn't load the configuration file. If I set the LoggingConfiguration inside the Main, it works prefectly. What I am missing?\r\n"},"comment":{"url":"https://api.github.com/repos/NLog/NLog/issues/comments/251107558","html_url":"https://github.com/NLog/NLog/issues/1158#issuecomment-251107558","issue_url":"https://api.github.com/repos/NLog/NLog/issues/1158","id":251107558,"user":{"login":"mk352","id":4665308,"avatar_url":"https://avatars.githubusercontent.com/u/4665308?v=3","gravatar_id":"","url":"https://api.github.com/users/mk352","html_url":"https://github.com/mk352","followers_url":"https://api.github.com/users/mk352/followers","following_url":"https://api.github.com/users/mk352/following{/other_user}","gists_url":"https://api.github.com/users/mk352/gists{/gist_id}","starred_url":"https://api.github.com/users/mk352/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mk352/subscriptions","organizations_url":"https://api.github.com/users/mk352/orgs","repos_url":"https://api.github.com/users/mk352/repos","events_url":"https://api.github.com/users/mk352/events{/privacy}","received_events_url":"https://api.github.com/users/mk352/received_events","type":"User","site_admin":false},"created_at":"2016-10-03T13:38:20Z","updated_at":"2016-10-03T13:38:20Z","body":"Was anyone able to successfully get the log file created? I was able to load the configuration in Xamarin.Android but when I go to log something, the file is never created. I tried a couple of different directories included the ExternalFiledir and CacheDir. I Also tried manually creating the file and writing to it prior to logging but that did not work as well. I didn't see any errors in the LogCat either. Any ideas?"}}
{"actor":{"display_login":"mk352"}}