The Log4Net mailing list is a great source of information about using log4Net, in this forum we collect all the messages in the log4net user list and some selected threads from the developer list.
| Author |
Messages |
|
daniel.nitecki@o-i.com
 |
| 02/04/2009 3:40 PM |
|
Hi, I am using log4net 1.2.10 RollingFileAppender in C#/VS2005. Rolling the files by date. Everything is working fine except that the final log file written before program exit is not rolled and remains named as a temp file (just the name as specified in file value without the date pattern and extension). I am calling the Shutdown function, but this does not seem to help. Attached is the .config xml I'm currently using. Its set to rollover on minute boundaries as a debugging convenience. Some of the tags may be extraneous, I've been trying a few different strategies for dealing with this... As an additional layer of complexity, I'm actually using this from VB6/COM. My C# code is just a ComVisible wrapper to the basic log4net calls. Any input would be appreciated. This is starting to drive me nuts.
Regards,
Dan
|
|
|
|
|
daniel.nitecki@o-i.com
 |
| 02/04/2009 3:44 PM |
|
arg... Here is the xml I promised:
<?xml version="1.0" encoding="utf-8" ?>
<configuration> <!-- Register a section handler for the log4net section --> <configSections> <section name="log4net" type="System.Configuration.IgnoreSectionHandler" /> </configSections>
<appSettings> <!-- To enable internal log4net logging specify the following appSettings key --> <!-- <add key="log4net.Internal.Debug" value="true"/> --> </appSettings>
<!-- This section contains the log4net configuration settings --> <log4net> <appender name="MinuteRollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> <file value="C:\OIApps\Interactive\MSDiagnostics\MSDLog" /> <appendToFile value="true" /> <rollingStyle value="Date" /> <datePattern value="HHmm.lo\g" /> <lockingModel type="log4net.Appender.FileAppender+MinimalLock" /> <bufferSize value="0" /> <ImmediateFlush value="true" /> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" /> </layout> </appender>
<root> <level value="ALL" /> <appender-ref ref="MinuteRollingLogFileAppender" /> </root>
</log4net> </configuration>
|
|
|
|
|
|
| You are not authorized to post a reply. |
|
|
|
ActiveForums 3.7
|