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.

Reply via email to