Perhaps there is something wrong in your
Opal.Logging.LogEntry.SetConfigurator method. Can we see the source to
that? My Application_End usually includes a simple message to help my
keep track of when the app domain gets unloaded.
protected void Application_End(Object sender, EventArgs e)
{
log.Info("Application ended");
log4net.LogManager.Shutdown();
}
Maybe something isn't automatically be re-initialized when the app
domain gets reloaded...
--- Fahad Sarwar <[EMAIL PROTECTED]> wrote:
> Hi, I am using Log4Net within a WebService. I have been successfully
> logging to a file using the RollingFileAppender, however recently the
> webservice stops logging completly to the file for no apparant
> reason. The
> WebService continues to work successfully but no logs are generated.
> I have
> read in other threads that by touching the web.config file, this will
> cause
> the webservice to start logging again. This works fine, but again,
> sometimes a week later or a month later, the WebService stops
> logging.
>
> Has anyone come across this problem in the past as i have not seen
> anything
> on the forum.
>
> Below is a sample of the web.config used.
>
> <?xml version="1.0" encoding="utf-8" ?>
> <configuration>
> <configSections>
> <section name="log4net"
> type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
> </configSections>
> <appSettings>
> ....
> </appSettings>
>
>
> <log4net>
> <appender name="RollingFileAppender"
> type="log4net.Appender.RollingFileAppender">
> <param name="File"
>
value="C:\\logs\\NGSPublicMobilePrePayProvisioningService\\NGSPublicMobilePr
> ePayLog" />
> <param name="AppendToFile" value="true" />
> <param name="RollingStyle" value="Date" />
> <!--<param name="MaxSizeRollBackups" value="10" />-->
> <param name="DatePattern" value="yyyyMMdd" />
> <param name="StaticLogFileName" value="false" />
> <layout type="log4net.Layout.PatternLayout">
> <param name="ConversionPattern" value="%d - %m%n" />
> </layout>
> </appender>
>
>
> <appender name="OpalLoggingAppender"
> type="log4net.Appender.OpalLoggingAppender" >
> <param name="threshold" value="FATAL" />
> </appender>
>
> <root>
> <level value="INFO" />
> <appender-ref ref="OpalLoggingAppender" />
> <appender-ref ref="RollingFileAppender" />
> </root>
> </log4net>
>
> </configuration>
>
> Within my Global.asax file i use the following line of code, which
> basically
> tells the log4net where to find the web.config:
>
> protected void Application_Start(Object sender, EventArgs e)
>
> {
>
Opal.Logging.LogEntry.SetConfigurator(AppDomain.CurrentDomain.SetupInformati
> on.ConfigurationFile); }
>
>
>
>
> Fahad Sarwar
>
> Opal Telecom
>
> Applications Team
>
> Irlam
>
> Tel: +44 161 222 2145
>
> Fax: +44 161 222 2008
>
> Email: [EMAIL PROTECTED]
>
>
>
> This communication together with any attachments transmitted with it
> ("this
> E-Mail") is intended only for the use of the addressee and may
> contain
> information which is privileged and confidential. If the reader of
> this
> E-Mail is not the intended recipient or the employee or agent
> responsible
> for delivering it to the intended recipient you are hereby notified
> that any
> use, dissemination, forwarding, printing or copying of this E-Mail is
> strictly prohibited. Addressees should check this E-mail for viruses.
> The
> Company makes no representations as regards the absence of viruses in
> this
> E-Mail. If you have received this E-Mail in error please notify our
> IT
> Support Team immediately by telephone on 0845 456 9100 or via e-mail
> at
> [EMAIL PROTECTED] Please then immediately delete, erase or
> otherwise
> destroy this E-Mail and any copies of it.
>
> Any opinions expressed in this E-Mail are those of the author and do
> not
> necessarily constitute the views of the Company. Nothing in this
> E-Mail
> shall bind the Company in any contract or obligation.
>
> For the purposes of this E-Mail "the Company" means Opal Telecom Ltd.
> Please feel free to visit our website:
> <http://www.opaltelecom.co.uk/>
> www.opaltelecom.co.uk
>
> Opal Telecom Ltd (Registered in England & Wales No. 3849133)
>
> Brinell Drive, Northbank Industrial Park, Irlam, Manchester M44 5BL.
>
> A member of the Carphone Warehouse Group of Companies
>
>
>