472,122 Members | 1,414 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,122 software developers and data experts.

log4net and the GAC

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

Jun 6 '07 #1
2 6149
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 (wa****@online.microsoft.com, 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.

Jun 7 '07 #2
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

MJust curious - do people work with log4net with assemblies they put
Min the
MGAC? Without a fully qualified path, where would an assembly in the
MGAC be
Mlooking? e.g.
M[assembly: log4net.Config.XmlConfigurator(ConfigFile = "app.log4net",
MWatch
M= true)]
Mindicates where to find the log4net config; usually this would be
Mcolocated
Mwith the app.
MWhen you put the assembly in the GAC, what is the relative location
Mthen? Is the only option to use fully qualified paths?
M>
MThanks
MMark
Jun 7 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by SK | last post: by
reply views Thread by anonieko | last post: by
reply views Thread by Joneleth | last post: by
4 posts views Thread by Gawel | last post: by
2 posts views Thread by Vikram | last post: by
2 posts views Thread by Marc Scheuner | last post: by
2 posts views Thread by forest demon | last post: by
reply views Thread by rosshinkley | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.