|
using System;
using System.Collections.Generic;
using System.Text;
namespace Eucalypto
{
/// <summary>
/// Log helper class using log4net.
/// Configure log4net to enable logging before using these methods.
/// </summary>
public static class Log
{
public static void Error(Type context, string message)
{
log4net.ILog log = log4net.LogManager.GetLogger(context);
log.Error(message);
}
public static void Error(Type context, string message, Exception exception)
{
log4net.ILog log = log4net.LogManager.GetLogger(context);
log.Error(message, exception);
}
public static void Warning(Type context, string message, Exception exception)
{
log4net.ILog log = log4net.LogManager.GetLogger(context);
log.Warn(message, exception);
}
public static void Debug(Type context, string message)
{
log4net.ILog log = log4net.LogManager.GetLogger(context);
log.Debug(message);
}
}
}
|
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.