GS-Scooter
GS-Scooter

Reputation: 101

NLog file target not working in Xamarin MonoMac project

The target platform for this application is OSX. I've tried using different versions of NLog to get this working, but I'm not having any luck. The console and debugger targets work fine, but I can't get any other targets to work (e.g., file, eventlog, etc.). My file target is pretty simple:

<target name="file" xsi:type="File" layout="${logFormat}" fileName="${basedir}/logs/${shortdate}.log" />

There's no exception being thrown, but no log file is being created. My hope is that I'm just missing something pretty simple. Any help would be greatly appreciated!

Thanks.

Jon

Upvotes: 0

Views: 1041

Answers (1)

GS-Scooter
GS-Scooter

Reputation: 101

Turns out ${basedir} was pointing to a location that I wasn't expecting (Contents folder within the app package). File logging is indeed working like a charm.

Upvotes: 1

Related Questions