Thank you all! That is what I was looking for.
Sergey
Hi,
to avoid multiple configuration, you could use code like this:
if(log4net.LogManager.GetRepository().Configured == false)
{
log4net.Config.XmlConfigurator.ConfigureAndWatch(new
System.IO.FileInfo(...));
}
Hth,
Franz
> -Ursprüngliche Nachricht-
> Von: news [mailto:[EMAIL
Sergey,
I had a similar problem, or desire not to configure repeatedly.. Solved it
with this "helper":
-
public sealed class log4netHelper
{
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
pu
No I didn't know this. Thank you I have tried,
but during my test when I put DB offline/online it didn't change the
behaviour.
Is this configuration correct?
type="log4net.Appender.AdoNetAppender">
.
Thank you
Martin Hassman
http://www.met.cz/
Ron Grabowski n
Hi,
Thanks for the answer. Are your plugin class created one time only? If there
are several instances of your class created then
XmlConfigurator.ConfigureAndWatch method is called several times. Does it
work? I wonder if log4net reloads its configuration every time
ConfigureAndWatch is called
Thank you Dean for your suggestion.
Now I have figured out how to get there.
Here is these steps:
1.place your separate log4net configuration whatever location take
C:\config\log4netcfg.xml for example.
2.my add-in is an assembly which recursively references other assemblies,
Now I can programat
Hi, Sergey.
I met the same problem as you do. I want to use log4net in my VS2005
add-in. It's a class library assembly and hosted in devenv.exe(VS2005 IDE).
Now I have figured out how to get there after I post in this mailist and
got help from Dean Fiala. Thank you very much Dean Fiala. Here is