Hi,
So I've got a website and a console app that runs daily.
They both call a Function called ProcessIncident(). The website allows you to do it manually for an individual incident and the console app does a batch every night.
Within the function I have various log4net Log.InfoFormat() and Log.DebugFormat() calls
When I run from the website it logs fine
when I run from the console app it doesn't log at all
The path specified definatly exists
The console app config is as follows
<?xml version="1.0" encoding="utf-8" ?>
<log4net xmlns="urn:log4net">
<logger name="NHibernate">
<level value="OFF" />
<appender-ref ref="NHibernateFileAppender" />
</logger>
<logger name="SMS">
<level value="ALL" />
<appender-ref ref="SmsFileAppender" />
</logger>
<appender name="SmsFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="D:\XXXX\SMS.IncidentBilling.log" />
<appendToFile value="true" />
<rollingStyle value="Size" />
<maxSizeRollBackups value="2" />
<maximumFileSize value="1MB" />
<staticLogFileName value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date] %-5level %logger %message %newline" />
</layout>
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
</appender>
<appender name="NHibernateFileAppender" type="log4net.Appender.FileAppender">
<file type="log4net.Util.PatternString" value="D:\Dev\SMS\Main\Source\SMS.Website\Logs\nhibernate.log" />
<appendToFile value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date] %appdomain %-5level %c %message %newline" />
</layout>
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
</appender>
</log4net>
In the console app I have refereneced log4net dll and am declareing amember as
private ILog Log = LogManager.GetLogger(typeof(Task));
Can anyone see anything stupid that I am doing. THere are no actual errors, just nothing is gettign logged via the console app