Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Invalid
-
None
-
None
-
None
Description
I've written some extension methods to support logging with string formatting which would be a nice feature to include in the framework.
namespace log4net
{
/// <summary>
/// Some usefull extensions on log4net
/// </summary>
public static class log4netExtensions
{
/// <summary>
/// Log at level Debug
/// </summary>
/// <param name="log">The type that is extended.</param>
/// <param name="message">A composite format string.</param>
/// <param name="args">An System.Object array containing zero or more objects to format.</param>
public static void Debug(this ILog log, string message, params object[] args)
/// <summary>
/// Log at level Error
/// </summary>
/// <param name="log">The type that is extended.</param>
/// <param name="message">A composite format string.</param>
/// <param name="args">An System.Object array containing zero or more objects to format.</param>
public static void Error(this ILog log, string message, params object[] args)
/// <summary>
/// Log at level Info
/// </summary>
/// <param name="log">The type that is extended.</param>
/// <param name="message">A composite format string.</param>
/// <param name="args">An System.Object array containing zero or more objects to format.</param>
public static void Info(this ILog log, string message, params object[] args)
/// <summary>
/// Log at level Warn
/// </summary>
/// <param name="log">The type that is extended.</param>
/// <param name="message">A composite format string.</param>
/// <param name="args">An System.Object array containing zero or more objects to format.</param>
public static void Warn(this ILog log, string message, params object[] args)
}
}