> Hello,
> 
> Sorry I've  sent in the problem below .  It can be removed again as it was
> not a real problem but a silly user error.  In the DLL the logger name was
> also determined at configuration time, a different name being used
> depending on where the DLL was called from.  The message logged after
> configuration was in the log.  However a default logger name was passed
> when the next message was logged.  This default logger name was incorrect
> and not present in the config file.  
> 
> Marleen
>  -----Original Message-----
> From:         Marleen Holvoet  
> Sent: 17 January 2007 16:14
> To:   '[email protected]'
> Subject:      Only the first message gets logged by a DLL 
> 
> Hello,
> 
> I have a DLL which gets called from within two applicatons
> - an application which consists of 3 assemblies deployed in SQL server
> (log4net and the DLL assembly are referenced and installed in the SQL
> server)
> - an ASP.net application which uses the DLL (the DLL is a project in the
> Visual Studio solution) 
> 
> When any of these applications run, the first time we log a message in the
> DLL, it gets written to the log file.  After that no other messages are
> written by the DLL.  The messages written by the base application are
> written out with no problem.
> 
> I use version log4net version 1.2.10.0  and .NET 2
> I have a config file for each of the applications. Both applications log
> to a different file.
> 
>     <!-- RollingFileAppender looks after rolling over files by size (10
> meg per log file, 2 log files). -->
>     <!-- Logs all levels messages -->
>     <appender name="RollingFileAppender"
> type="log4net.Appender.RollingFileAppender">
>       <filter type="log4net.Filter.LevelRangeFilter">
>         <levelMin value="DEBUG" />
>         <levelMax value="FATAL" />
>       </filter>
>       <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
>       <param name="File" value="C:\example\CMSComms.log" />
>       <param name="AppendToFile" value="true" />
>       <param name="MaxSizeRollBackups" value="100" />
>       <param name="MaximumFileSize" value="1MB" />
>       <param name="RollingStyle" value="Size" />
>       <param name="StaticLogFileName" value="true" />
>       <param name="CountDirection" value="1"/>
>       <layout type="log4net.Layout.PatternLayout">
>         <conversionPattern value="%date %-5level *%message* [%thread]
> %logger %exception%newline" />
>       </layout>
>     </appender>
> ...
>     <!-- Entry for the specified DLL. -->
>      <logger name="Comms.Business">
>       <level value="DEBUG" />
>       <appender-ref ref="RollingFileAppender" />
>       <appender-ref ref="TraceAppender" />
>     </logger>
> 
> Each project, including the DLL, call ConfigureAndWatch with the config
> file name once before logging the first message.
> 
> Any ideas what I could be doing wrong ?
> 
> Marleen Holvoet
> Software Engineer
> Speakerbus Ltd
> 
> Tel: +44 (0)1992 706563
> Email: [EMAIL PROTECTED]
> Web: www.speakerbus.com
> 
> 

******************************************************************************
The contents of this e-mail and any attachments are confidential and are 
intended solely for the attention and use of the intended recipient. 
This message should not be copied or forwarded to any other person without 
the express permission of the sender. If you are not the intended recipient, 
you are hereby notified that to disclose, copy, distribute or retain this 
message or any part of it, is strictly unauthorised and forbidden. 
If you have received this message in error, please notify the sender by 
telephone or by reply e-mail, and destroy the original message. Any views or
opinions presented are solely those of the author and do not necessarily 
represent those of Speakerbus unless otherwise specifically stated. We reserve 
the right to monitor all e-mail messages passing through our network.

Speakerbus Group Plc - Head Office, Fourways House, 4-10 Ware Road, 
Hoddesdon, Hertfordshire, EN11 9RS, England. 
Tel: +44 1992 706500 Fax: +44 1992 446037
Company Registration No 3330946 
Home Page: http://www.speakerbus.com
******************************************************************************

Reply via email to