The Log4Net mailing list is a great source of information about using log4Net, in this forum we collect all the messages in the log4net user list and some selected threads from the developer list.
| Author |
Messages |
|
Chris Stoyles
 |
| 11/25/2008 11:25 PM |
|
Hi guys,
I've got a Windows Forms Application written in C# under .NET 2.0. Inside the static main method for the application I've got the following:
FileAppender appender = new FileAppender(); appender.Layout = new SimpleLayout(); appender.File = "mylog.log"; appender.Threshold = Level.Debug; appender.ActivateOptions(); BasicConfigurator.Configure(appender);
The log file gets created, however none of my calls to Debug() ever produce any log entries in the file. Below is an example of this, I have written a class called BasicClass which helps the form do some work:
private static readonly ILog log = LogManager.GetLogger(typeof(BasicClass));
and further down I do something like this:
log.Debug("my log message");
Am I setting the Threshold property in the wrong area or something like that? I've been trying to get this thing working all afternoon with no luck...hopefully someone can point out what stupid mistake I am making.
Chris. |
|
|
|
|
|
| You are not authorized to post a reply. |
|
|
|
ActiveForums 3.7
|