{"action":"closed","issue":{"url":"https://api.github.com/repos/NLog/NLog/issues/1490","repository_url":"https://api.github.com/repos/NLog/NLog","labels_url":"https://api.github.com/repos/NLog/NLog/issues/1490/labels{/name}","comments_url":"https://api.github.com/repos/NLog/NLog/issues/1490/comments","events_url":"https://api.github.com/repos/NLog/NLog/issues/1490/events","html_url":"https://github.com/NLog/NLog/issues/1490","id":157463946,"number":1490,"title":"Special folder filename in Xamarin Android doesnt work","user":{"login":"polipo","id":2419318,"avatar_url":"https://avatars.githubusercontent.com/u/2419318?v=3","gravatar_id":"","url":"https://api.github.com/users/polipo","html_url":"https://github.com/polipo","followers_url":"https://api.github.com/users/polipo/followers","following_url":"https://api.github.com/users/polipo/following{/other_user}","gists_url":"https://api.github.com/users/polipo/gists{/gist_id}","starred_url":"https://api.github.com/users/polipo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/polipo/subscriptions","organizations_url":"https://api.github.com/users/polipo/orgs","repos_url":"https://api.github.com/users/polipo/repos","events_url":"https://api.github.com/users/polipo/events{/privacy}","received_events_url":"https://api.github.com/users/polipo/received_events","type":"User","site_admin":false},"labels":[{"id":13795221,"url":"https://api.github.com/repos/NLog/NLog/labels/bug","name":"bug","color":"fc2929","default":true},{"id":167059344,"url":"https://api.github.com/repos/NLog/NLog/labels/needs%20info","name":"needs info","color":"eb6420","default":false},{"id":451952098,"url":"https://api.github.com/repos/NLog/NLog/labels/Xamarin","name":"Xamarin","color":"2C3E50","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-05-30T09:19:46Z","updated_at":"2016-11-27T00:07:13Z","closed_at":"2016-11-27T00:07:13Z","body":"Dear,\ni have notice if I use in NLog.config the special folder \"My Documents\" it doesnt work in Xamarin Android.\n\n**Type** (choose one):\n- Bug\n\n**NLog version**: 4.3.4\n\n**Platform**: .Xamarin Android \n\n**Current NLog config** (xml or C#, if relevant)\n\n``` xml\n<target xsi:type=\"File\" name=\"file\" \n              fileName=\"${specialfolder:folder=MyDocuments}/touchECG/log/${shortdate}.log\"\n              layout=\"&lt;${pad:padding=4:fixedLength=true:${uppercase:${level}}}&gt; ${longdate} (${processid}:${pad:padding=3:padCharacter=0:${threadid}}) [${callsite}] ${message}\"\n              keepFileOpen=\"true\"\n              concurrentWrites = \"false\"\n              autoFlush =\"true\"\n              archiveNumbering =\"Date\"\n              archiveEvery=\"Day\"\n              maxArchiveFiles=\"30\" />\n    </target>\n```\n\nIn case of a BUG:\n- What is the current result? the target file dont write\n- What is the expected result? the target file must write into the android's documents folder\n- Did you checked the [Internal log](https://github.com/NLog/NLog/wiki/Internal-Logging)? no\n- Are there any work arrounds? yes\n\nI must set the filename target by code like this \nif (SdkVersion >= 19) //google has introduce the \"documents\" folder else you must use downloads..\nfilename =  Android.OS.Environment.DirectoryDocuments;\nelse\nfilename =  Android.OS.Environment.DirectoryDownloads;\n\nother condition is to save into external SD memory...\nfilename = Android.OS.Environment.GetExternalStoragePublicDirectory(filename);\n- Is there a version in which it did worked?  no\n- Can you help us by writing an unit test? ..i dont think\n\nin case of a FEATURE REQUEST:\n- Why do we need it?\n- An example of the XML config, if relevant. \n"}}
{"actor":{"display_login":"304NotModified"}}