Hi there,
Can anyone help, i have been using log4net with success i basically had a static class (wrapper) in my webproject and i load my config from external file called log4net.config by adding this in assemblyinfo.cs
// log4net config file
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "Log4Net.config", Watch = true)]
All good!, now i decided to move my static class to its own class project so i can share my static class (wrapper) with other projects.
The log4net.config is still in the webproject but of course its not getting loaded now, I can tell this because in my static class (now its own project) i am doing
return LogManager.GetLogger("InfoLogger").IsInfoEnabled;
and IsInfoEnabled returns false, and nothing is being logged, the .config file is not being read...
Remembering the Log4net wrapper (static class) is in its own class project but the .config file is in the web project ihave.. I need it like this because .config can change on a project by project basis but generally the wrapper won't.
Of course i thought i will create an abstract class and just inherit in my webproject and override anything if i need to ... BUT of course you can't inherit static classes or even make abstract..
I am sure someone else has come across this, any ideas? .. any help really appreciated