Mike, The RollingFileAppender needs to examine all the files in the output directory that may have been generated by rolling the output file. It does this by looking for files named 'file.XX' where XX is a number. In your case the XX is not a number causing the int.Parse to throw an exception, which is then caught.
The practice of throwing exceptions for expected conditions is frowned upon as it can introduce severe performance penalties. Microsoft are adding TryParse and IsNumeric calls to all the number types in .NET 2.0, however that is not a workable solution for us at the moment. While this isn't a fatal exception I will see what the performance of using Double.TryParse is like. Nicko > -----Original Message----- > From: Mike Blake-Knox [mailto:[EMAIL PROTECTED] > Sent: 07 February 2005 20:46 > To: Log4NET User > Subject: Another exception in RollingFileAppender > > When I start my application with the logging directory > containing some old log files, RollingFileAppender takes an > exception at line 803 (int backup = > int.Parse(curFileName.Substring(index + 1), > System.Globalization.NumberFormatInfo.InvariantInfo);). At > this point, curFileName is "ProphIT_CTI_Log.log.2005-02-01" > and index is 19. > > Here's the output of a dir showing the specific files in the > log directory when the exception occurs: > > 02/07/2005 02:59 PM 144,999 ProphIT_CTI_Log.log > 02/07/2005 11:31 AM 12,386 ProphIT_CTI_Log.log.1 > 02/07/2005 11:42 AM 11,604 ProphIT_CTI_Log.log.2 > 02/01/2005 05:35 PM 704,608 ProphIT_CTI_Log.log.2005-02-01 > 02/02/2005 02:31 PM 6,773 ProphIT_CTI_Log.log.2005-02-02 > 02/04/2005 05:33 PM 53,532 ProphIT_CTI_Log.log.2005-02-04 > 02/04/2005 03:02 PM 10,817 > ProphIT_CTI_Log.log.2005-02-04.3 > 02/04/2005 03:22 PM 10,677 > ProphIT_CTI_Log.log.2005-02-04.4 > 02/04/2005 04:40 PM 11,258 > ProphIT_CTI_Log.log.2005-02-04.5 > 02/04/2005 05:06 PM 12,073 > ProphIT_CTI_Log.log.2005-02-04.6 > 02/04/2005 05:07 PM 12,067 > ProphIT_CTI_Log.log.2005-02-04.7 > 02/07/2005 11:55 AM 12,350 ProphIT_CTI_Log.log.3 > > The exception is caught (several times) and handled but I > think it's the reason the first log takes so long to be > delivered. I discovered it as a result of running the > application under the debugger so I don't think it's too critical. > > > -- > Mike Blake-Knox >
