|
using log4net;
using log4net.Config;
public class LogTest3
{
private static readonly ILog logger = LogManager.GetLogger(typeof(LogTest3));
static LogTest3()
{
DOMConfigurator.Configure();
}
static void Main(string[] args)
{
LogTest3 log3 = new LogTest3();
log3.DoLogging();
LogTest4 log4 = new LogTest4();
log4.DoLogging();
}
public void DoLogging()
{
logger.Debug("Here is a debug log from LogTest3.");
logger.Info("... and an Info log from LogTest3.");
}
}
public class LogTest4
{
private static readonly ILog logger = LogManager.GetLogger(typeof(LogTest4));
static LogTest4()
{
DOMConfigurator.Configure();
}
public void DoLogging()
{
logger.Debug("Here is a debug log from LogTest4.");
logger.Info("... and an Info log from LogTest4.");
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.