I've created the following extension method to log4net's ILog
interface:
public static void Debug(this ILog log, IDiagnosticMessage message)
{
// do some stuff with the IDiagnosticMessage and end up calling ILog.Logger.Log with the result
}
The compiler doesn't seem to want to use this method. When I call ILog.Debug
with an IDiagnosticMessage
parameter it always uses log4net's ILog.Debug(object)
overload.
Short of explicitly calling the static method does anybody have any ideas what I can do to make the compiler call my extension instead of the interface method?