NLog Failing Silently

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

NLog Failing Silently

Patrick
Hi,

I have a problem with NLog failing to create log files on a local IIS server ASP.NET application.  I have tried following through the troubleshooter page, I have turned on internal logging and exceptions, and I have tried changing an NLog boolean value to 'fals' (which gave an exception) to prove that NLog is loading and attempting to do something.

This is my temporary config file, in which I have turned on everything I can think of to try to get this working.  Any help would be very much appreciated.

<?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" internalLogFile="C:/Users/Patrick/" internalLogLevel="Trace" throwExceptions="true">

        <targets async="false">
                <target name="FileForAllLogMessages" xsi:type="File" fileName="${basedir}/logs/LogFile.txt" deleteOldFileOnStartup="true"
                        layout="${longdate}|${level:uppercase=true}|${logger}|${message}" autoFlush="true" createDirs="true" />
        </targets>
        <rules>
                <logger name="*" minlevel="Trace" writeTo="FileForAllLogMessages" />
        </rules>
</nlog>

Kind wishes, Patrick
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Started working, now stopped again, with no code changes

Patrick
An update on my previous post ...

Yesterday, I got NLog working using the configuration I have posted above.  It worked all yesterday afternoon (though some messages - e.g. one in Application_Start - mysteriously seemed to fail randomly).  I have fired up the project again today and, without touching any code, it has simply stopped working.

I am really hoping someone can help here.  I have spent days on this already.  I really like NLog but I am faced with simply having to ditch it because I have to have something I can rely on.

Kind wishes, Patrick

Loading...