A total of six logging levels are defined that can be used to determine what types of logging to output. Individual logging levels can be turned off and each logging target can have a minimum logging level.
//Example turning on an individual logging level
Log.Config.IsInfoEnabled = true;
StringBuilderTarget target = new StringBuilderTarget();
Log.Config.Targets.Add(target);
target.MinimumLevel = LoggingLevel.INFO;
//This message will not be logged because the minimum level for the StringBuilderTarget is Info
Log.Debug("This is a debug test");
//This message will be logged
Log.Info("This is an info test");
/// <summary>
/// Defines different levels of logging
/// </summary>
[Serializable]
public enum LoggingLevel
{
/// <summary>
/// Debug is mainly used for detailed developer debug purposes
/// </summary>
Debug=1,
/// <summary>
/// Info is used to produce information at critical points in the application
/// </summary>
Info=2,
/// <summary>
/// Something unexpected happened, an error may happen soon
/// </summary>
Warn=3,
/// <summary>
/// An unexpected exception occured in the application
/// </summary>
Error=4,
/// <summary>
/// The application is about to exit due to a previous error
/// </summary>
Fatal=5,
/// <summary>
/// Turn off logging
/// </summary>
Off=6
}