log4net and the GAC

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Just curious - do people work with log4net with assemblies they put in the
GAC? Without a fully qualified path, where would an assembly in the GAC be
looking? e.g.
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "app.log4net", Watch
= true)]
indicates where to find the log4net config; usually this would be colocated
with the app.

When you put the assembly in the GAC, what is the relative location then?
Is the only option to use fully qualified paths?


Thanks
Mark
 
Hi Mark,

I'm not familiar with log4net, but I think this will depend on how the
attribute interpret the ConfigFile property. If it's using current
AppDomain's base directory, then it should be able to use your program's
path regardless if the library resides in GAC or not.

Anyway, you may need to consult the log4net's documentation or refer to its
source code for more information.


Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hello Mark,

Why not just add reference to the log4net from GAC and use the simple [assembly:
XmlConfigurator()] ?

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

M> Just curious - do people work with log4net with assemblies they put
M> in the
M> GAC? Without a fully qualified path, where would an assembly in the
M> GAC be
M> looking? e.g.
M> [assembly: log4net.Config.XmlConfigurator(ConfigFile = "app.log4net",
M> Watch
M> = true)]
M> indicates where to find the log4net config; usually this would be
M> colocated
M> with the app.
M> When you put the assembly in the GAC, what is the relative location
M> then? Is the only option to use fully qualified paths?
M>
M> Thanks
M> Mark
 
Back
Top