logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <CL...@SummitRacing.com>
Subject RE: GAC vs. XmlHierarchyConfigurator Problem
Date Wed, 10 Sep 2008 16:57:46 GMT
This would be because I'm an idiot. :-)
I have the type in configSection set to the full GAC version/pubkey, but
I didn't have the full type set when defining appenders. Bigh duh.
 
-=Chris


________________________________

	From: CLaco@SummitRacing.com [mailto:CLaco@SummitRacing.com] 
	Sent: Wednesday, September 10, 2008 12:45 PM
	To: log4net-user@logging.apache.org
	Subject: GAC vs. XmlHierarchyConfigurator Problem
	
	

	I've found a few posts on Google about this issue, but none seem
to be the exact problem I'm having. 
	When I started adding log4net to some of my projects, I just
added a reference to the dll, which was then copied to the output
directory.

	I added this following code to my AssemblyInfo file, setup the
app.config and everything worked like a champ. 

	  <Assembly: log4net.Config.XmlConfigurator(Watch:=True)> 

	I then installed log4net into the GAC on the servers and then on
my machine and removed all copies from bin. Everything compiles, and
even runs fine, but nothing is logged.

	After turning on log4net internal debug logging,. I see the text
below in the log4net trace. 

	Clearly, It's loading log4net from the GAC to start with, but
then stalls out during the XmlHierarchyConfigurator part of the process.

	Any ideas? 

	Of course, if I place a copy in bin, it works; thus defeating
the purpose of installing it into the GAC. 

	-=Chris 

	--- 
	log4net: log4net assembly [log4net, Version=1.2.10.0,
Culture=neutral, PublicKeyToken=1b44e1d426115821]. Loaded from [Global
Assembly Cache]. (.NET Runtime [2.0.50727.3053] on Microsoft Windows NT
5.1.2600 Service Pack 2)

	log4net: DefaultRepositorySelector: defaultRepositoryType
[log4net.Repository.Hierarchy.Hierarchy] 
	log4net: DefaultRepositorySelector: Creating repository for
assembly [SRE.Services.OrderImportService, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=c5b9e92786b57ef1]

	log4net: DefaultRepositorySelector: Assembly
[SRE.Services.OrderImportService, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=c5b9e92786b57ef1] Loaded From
[C:\Development\OrderImportService\bin\Debug\SRE.Services.OrderImportSer
vice.exe]

	log4net: DefaultRepositorySelector: Assembly
[SRE.Services.OrderImportService, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=c5b9e92786b57ef1] does not have a RepositoryAttribute
specified.

	log4net: DefaultRepositorySelector: Assembly
[SRE.Services.OrderImportService, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=c5b9e92786b57ef1] using repository
[log4net-default-repository] and repository type
[log4net.Repository.Hierarchy.Hierarchy]

	log4net: DefaultRepositorySelector: Creating repository
[log4net-default-repository] using type
[log4net.Repository.Hierarchy.Hierarchy]

	log4net: XmlConfigurator: configuring repository
[log4net-default-repository] using file
[C:\Development\OrderImportService\bin\Debug\SRE.Services.OrderImportSer
vice.exe.config] watching for file updates

	log4net: XmlConfigurator: configuring repository
[log4net-default-repository] using file
[C:\Development\OrderImportService\bin\Debug\SRE.Services.OrderImportSer
vice.exe.config]

	log4net: XmlConfigurator: configuring repository
[log4net-default-repository] using stream 
	log4net: XmlConfigurator: loading XML configuration 
	log4net: XmlConfigurator: Configuring Repository
[log4net-default-repository] 
	log4net: XmlHierarchyConfigurator: Configuration update mode
[Merge]. 
	log4net: XmlHierarchyConfigurator: Logger [root] Level string is
[ALL]. 
	log4net: XmlHierarchyConfigurator: Logger [root] level set to
[name="ALL",value=-2147483648]. 
	log4net: XmlHierarchyConfigurator: Loading Appender
[LogFileAppender] type: [log4net.Appender.RollingFileAppender,log4net]

	log4net:ERROR XmlHierarchyConfigurator: Could not create
Appender [LogFileAppender] of type
[log4net.Appender.RollingFileAppender,log4net]. Reported error follows.

	System.IO.FileNotFoundException: Could not load file or assembly
'log4net' or one of its dependencies. The system cannot find the file
specified.

	File name: 'log4net' 
	   at System.RuntimeTypeHandle._GetTypeByName(String name,
Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly,
StackCrawlMark& stackMark, Boolean loadTypeFromPartialName)

	   at System.RuntimeTypeHandle.GetTypeByName(String name,
Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly,
StackCrawlMark& stackMark)

	   at System.RuntimeType.PrivateGetType(String typeName, Boolean
throwOnError, Boolean ignoreCase, Boolean reflectionOnly,
StackCrawlMark& stackMark)

	   at System.Type.GetType(String typeName, Boolean throwOnError,
Boolean ignoreCase) 
	   at log4net.Util.SystemInfo.GetTypeFromString(Assembly
relativeAssembly, String typeName, Boolean throwOnError, Boolean
ignoreCase)

	   at log4net.Util.SystemInfo.GetTypeFromString(String typeName,
Boolean throwOnError, Boolean ignoreCase) 
	   at
log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseAppender(XmlE
lement appenderElement) 

	WRN: Assembly binding logging is turned OFF. 
	To enable assembly bind failure logging, set the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.

	Note: There is some performance penalty associated with assembly
bind failure logging. 
	To turn this feature off, remove the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog]. 

	log4net:ERROR XmlHierarchyConfigurator: Appender named
[LogFileAppender] not found. 



Mime
View raw message