Hi Raj,
I also noticed that logging suddenly stops for my VS solutions. This
occurs for me, if I add another project to my solution that does not
contain the log4net logger configuration. Logging works for me only if I
have the log4net config files in all projects. So try to add the
following log4net configuration in ALL of your projects:
In the file AssemblyInfo.cs add:
// Configure Log4Net using the XML properties
[assembly: XmlConfigurator()]
Add a App.config file that contains the log4net configuration section.
Best regards,
Ulli
Message
From: Muchhala, Raj [mailto:Raj.Muchhala (AT) assurant (DOT) com]
Sent: Tuesday, May 09, 2006 8:51 PM
To: log4net-user (AT) logging (DOT) apache.org
Subject: Problems logging
I have two applications that use log4net (1.2.9.0) and both are
configured the exact same way. Yesterday, one of the applications
suddenly stopped logging. A trace of the two apps revealed the
following:
App (Does not work)
log4net: log4net assembly [log4net, Version=1.2.9.0, Culture=neutral,
]. Loaded from
[c:\windows\microsoft.net\framework\v1.1.4322\tempo rary asp.net
files\gmportal\8786bfdf\bf1184a3\assembly\dl2\e56b fd36\a06700a1_f972c601
\log4net.dll]. (.NET Runtime [1.1.4322.2300] on Microsoft Windows NT
5.2.3790.0)
log4net: DefaultRepositorySelector: defaultRepositoryType
[]
log4net: DefaultRepositorySelector: Creating repository for assembly
[Test.Flip, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]
log4net: DefaultRepositorySelector: Assembly [Test.Flip,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] Loaded From
[c:\windows\microsoft.net\framework\v1.1.4322\tempo rary asp.net
files\gmportal\8786bfdf\bf1184a3\assembly\dl2\eb66 b878\20ef79a0_f972c601
\Test.Flip.dll]
log4net: DefaultRepositorySelector: Assembly [Test.Flip,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] does not have a
RepositoryAttribute specified.
log4net: DefaultRepositorySelector: Assembly [Test.Flip,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] using repository
[log4net-default-repository] and repository type
[]
App Two (Works)
log4net: log4net assembly [log4net, Version=1.2.9.0, Culture=neutral,
]. Loaded from
[c:\windows\microsoft.net\framework\v1.1.4322\tempo rary asp.net
files\myaccount\e53f1be8\731ae963\assembly\dl2\ba1 d2fb7\90158200_8373c60
1\log4net.dll]. (.NET Runtime [1.1.4322.2300] on Microsoft Windows NT
5.2.3790.0)
log4net: DefaultRepositorySelector: defaultRepositoryType
[]
log4net: DefaultRepositorySelector: Creating repository for assembly
[Test.Flop, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]
log4net: DefaultRepositorySelector: Assembly [Test.Flop,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null] Loaded From
[c:\windows\microsoft.net\framework\v1.1.4322\tempo rary asp.net
files\myaccount\e53f1be8\731ae963\assembly\dl2\d9d 55618\c04c440e_8373c60
1\Test.Flop.dll]
log4net: DefaultRepositorySelector: Assembly [Test.Flop,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null] does not have a
RepositoryAttribute specified.
log4net: DefaultRepositorySelector: Assembly [Test.Flop,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null] using repository
[log4net-default-repository] and repository type
[]
log4net: DefaultRepositorySelector: Creating repository
[log4net-default-repository] using type
[]
log4net: XmlConfigurator: configuring repository
[log4net-default-repository] using file [E:/Log4Net.config] watching for
file updates
log4net: XmlConfigurator: configuring repository
[log4net-default-repository] using file [E:/Log4Net.config]
log4net: XmlConfigurator: configuring repository
[log4net-default-repository] using stream
So the first one never gets to the XmlConfigurator. Anyone have any
ideas why this would suddenly stop working?
Both apps use the assembly attribute method for defining the config
location
<Assembly: log4net.Config.XmlConfigurator(ConfigFile:="Log4Net.config",
Watch:=True)>
Thanks,
Raj
This e-mail message and all attachments transmitted with it may contain
legally privileged and/or confidential information intended solely for
the use of the addressee(s). If the reader of this message is not the
intended recipient, you are hereby notified that any reading,
dissemination, distribution, copying, forwarding or other use of this
message or its attachments is strictly prohibited. If you have received
this message in error, please notify the sender immediately and delete
this message and all copies and backups thereof.
Thank you.