ILogExtensions ClassApache log4net™ SDK Documentation
The static class ILogExtensions contains a set of widely used methods that ease the interaction with the ILog interface implementations.
Inheritance Hierarchy

SystemObject
  log4net.UtilILogExtensions

Namespace: log4net.Util
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

public static class ILogExtensions
Methods

  NameDescription
Public methodStatic memberDebugExt(ILog, FuncTResult)
Public methodStatic memberDebugExt(ILog, Object)
Log a message object with the Debug level.
Public methodStatic memberDebugExt(ILog, FuncTResult, Void)
Public methodStatic memberDebugExt(ILog, Object, Exception)
Log a message object with the Debug level including the stack trace of the Exception passed as a parameter.
Public methodStatic memberDebugFormatExt(ILog, String, Object)
Logs a formatted message string with the Debug level.
Public methodStatic memberDebugFormatExt(ILog, String, Object)
Logs a formatted message string with the Debug level.
Public methodStatic memberDebugFormatExt(ILog, IFormatProvider, String, Object)
Logs a formatted message string with the Debug level.
Public methodStatic memberDebugFormatExt(ILog, String, Object, Object)
Logs a formatted message string with the Debug level.
Public methodStatic memberDebugFormatExt(ILog, String, Object, Object, Object)
Logs a formatted message string with the Debug level.
Public methodStatic memberErrorExt(ILog, FuncTResult)
Public methodStatic memberErrorExt(ILog, Object)
Log a message object with the Error level.
Public methodStatic memberErrorExt(ILog, FuncTResult, Void)
Public methodStatic memberErrorExt(ILog, Object, Exception)
Log a message object with the Error level including the stack trace of the Exception passed as a parameter.
Public methodStatic memberErrorFormatExt(ILog, String, Object)
Logs a formatted message string with the Error level.
Public methodStatic memberErrorFormatExt(ILog, String, Object)
Logs a formatted message string with the Error level.
Public methodStatic memberErrorFormatExt(ILog, IFormatProvider, String, Object)
Logs a formatted message string with the Error level.
Public methodStatic memberErrorFormatExt(ILog, String, Object, Object)
Logs a formatted message string with the Error level.
Public methodStatic memberErrorFormatExt(ILog, String, Object, Object, Object)
Logs a formatted message string with the Error level.
Public methodStatic memberFatalExt(ILog, FuncTResult)
Public methodStatic memberFatalExt(ILog, Object)
Log a message object with the Fatal level.
Public methodStatic memberFatalExt(ILog, FuncTResult, Void)
Public methodStatic memberFatalExt(ILog, Object, Exception)
Log a message object with the Fatal level including the stack trace of the Exception passed as a parameter.
Public methodStatic memberFatalFormatExt(ILog, String, Object)
Logs a formatted message string with the Fatal level.
Public methodStatic memberFatalFormatExt(ILog, String, Object)
Logs a formatted message string with the Fatal level.
Public methodStatic memberFatalFormatExt(ILog, IFormatProvider, String, Object)
Logs a formatted message string with the Fatal level.
Public methodStatic memberFatalFormatExt(ILog, String, Object, Object)
Logs a formatted message string with the Fatal level.
Public methodStatic memberFatalFormatExt(ILog, String, Object, Object, Object)
Logs a formatted message string with the Fatal level.
Public methodStatic memberInfoExt(ILog, FuncTResult)
Public methodStatic memberInfoExt(ILog, Object)
Log a message object with the Info level.
Public methodStatic memberInfoExt(ILog, FuncTResult, Void)
Public methodStatic memberInfoExt(ILog, Object, Exception)
Log a message object with the Info level including the stack trace of the Exception passed as a parameter.
Public methodStatic memberInfoFormatExt(ILog, String, Object)
Logs a formatted message string with the Info level.
Public methodStatic memberInfoFormatExt(ILog, String, Object)
Logs a formatted message string with the Info level.
Public methodStatic memberInfoFormatExt(ILog, IFormatProvider, String, Object)
Logs a formatted message string with the Info level.
Public methodStatic memberInfoFormatExt(ILog, String, Object, Object)
Logs a formatted message string with the Info level.
Public methodStatic memberInfoFormatExt(ILog, String, Object, Object, Object)
Logs a formatted message string with the Info level.
Public methodStatic memberWarnExt(ILog, FuncTResult)
Public methodStatic memberWarnExt(ILog, Object)
Log a message object with the Warn level.
Public methodStatic memberWarnExt(ILog, FuncTResult, Void)
Public methodStatic memberWarnExt(ILog, Object, Exception)
Log a message object with the Warn level including the stack trace of the Exception passed as a parameter.
Public methodStatic memberWarnFormatExt(ILog, String, Object)
Logs a formatted message string with the Warn level.
Public methodStatic memberWarnFormatExt(ILog, String, Object)
Logs a formatted message string with the Warn level.
Public methodStatic memberWarnFormatExt(ILog, IFormatProvider, String, Object)
Logs a formatted message string with the Warn level.
Public methodStatic memberWarnFormatExt(ILog, String, Object, Object)
Logs a formatted message string with the Warn level.
Public methodStatic memberWarnFormatExt(ILog, String, Object, Object, Object)
Logs a formatted message string with the Warn level.
Top
Remarks

This class contains methods for logging at different levels and checks the properties for determining if those logging levels are enabled in the current configuration.

Examples

Simple example of logging messages
C#
using log4net.Util;

ILog log = LogManager.GetLogger("application-log");

log.InfoExt("Application Start");
log.DebugExt("This is a debug message");
See Also

Reference