You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by Mike Williams <MW...@mbasys.co.uk> on 2005/04/20 16:30:51 UTC

ASP.NET Already Rolled Logfiles Locked and cannot be moved or del eted

We have been using log4net satisfactorily for some time in a number of our
projects but in one of our ASP.NET projects where we have a
RollingFileAppender set to roll over at midnight, the rolling works fine and
creates the correct files and logs into them great. However as these files
are getting larger, our Operations team want to move them off the servers
and back them up. Unfortunately the server will not let them do it as the OS
says the file is in use by another process. We are using log4net version
1.2.9.0 built from the CVS source code. The OS is Windows Server 2003. Is
there anything we are doing wrong?

I attach the log4net config section in case there is anything there that is
incorrect.

	<log4net>
		<appender name="RollingFileAppender"
type="log4net.Appender.RollingFileAppender">
			<layout type="log4net.Layout.PatternLayout">
				<param name="ConversionPattern" value="%d
[%a][%t] %-5p %c - %m%n" />
			</layout>
			<param name="File" value="Confirms" />
			<param name="AppendToFile" value="true" />
			<param name="RollingStyle" value="Date" />
			<param name="DatePattern" value="'-'yyyyMMdd'.log'"
/>
			<param name="StaticLogFileName" value="false" />
		</appender>
		<appender name="EventLogAppender"
type="log4net.Appender.EventLogAppender">
			<param name="ApplicationName"
value="Mba.Confirms.Info" />
			<layout type="log4net.Layout.PatternLayout">
				<param name="ConversionPattern" value="%d
[%a][%t] %-5p %c - %m%n" />
			</layout>
			<filter type="log4net.Filter.LevelRangeFilter">
				<param name="LevelMin" value="ERROR" />
				<param name="LevelMax" value="FATAL" />
			</filter>
		</appender>
		<root>
			<level value="DEBUG" />
			<appender-ref ref="RollingFileAppender" />
			<appender-ref ref="EventLogAppender" />
		</root>
	</log4net>

Thanks in advance
Mike

 
Dr. Mike Williams
Technical Director
MBA Systems Ltd.
----------------------------------------------------------------------------
This email and any files transmitted with it are intended solely for the
addressee(s) and may be legally privileged and/or confidential. If you have
received this email in error please destroy it and contact the sender, via
our switchboard on +44 (0)1962 841494 or via return e-mail. You should not
copy, forward or use the contents, attachments or information in any way.
Any unauthorised use or disclosure may be unlawful. MBA Systems gives no
warranty as to the accuracy or completeness of this email after it is sent
over the Internet and accepts no responsibility for changes made after it
was sent. Any opinion expressed in this email may be personal to the author
and may not necessarily reflect the opinions of MBA Systems or its
affiliates. They may also be subject to change without notice.
----------------------------------------------------------------------------