[Mono-osx] Logging with NLog

John Luetke john at johnluetke.net
Sun Aug 28 20:08:48 EDT 2011


What kind of logging messages are you trying to write? Your config says
minimum of "Info", so if you are trying to write Trace or Debug, no file
will be created.

Also, try using a absolute path for your log file, such as
"/Users/me/MyApp.log". I havent quite figured out where relative path files
are stored.


On Sun, Aug 28, 2011 at 12:07 PM, Richard de Zwart <mountain at xs4all.nl>wrote:

> Hello everyone,
> I'm trying to get NLog working for my MonoMac app. I have the latest 2.0
> mono-specific version, I followed the rules for setting up logging, but I
> cannot find any output files. I've set breakpoints on the lines where I do a
> logger.Debug() so I know the code gets hit.
> I've tried different versions of the naming convention:
> appliction.exe.nlog, NLog.config, NLog.dll.nlog and I made sure the
> properties were set well. I can see the config files show up in my bin/Debug
> directory.
> But no log files.
> Does this need special rights, or do the files get placed somewhere else? I
> tried to find the logfiles in the Finder all over my machine, but no luck.
> The NLog.config is below:
> <?xml version="1.0" encoding="utf-8"?>
> <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
>      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>    <targets>
>        <target name="errorFile" xsi:type="File" fileName="errors.txt" />
>    </targets>
>    <rules>
>        <logger name="*" minlevel="Info" writeTo="errorFile" />
>    </rules>
> </nlog>
> Thanks for helping,
> Richard
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20110828/b9c12bc2/attachment.html 

More information about the Mono-osx mailing list