Common Logging 2.0 API Reference

AbstractLogger.Warn(IFormatProvider, Action) Method

Log a message with the Warn level using a callback to obtain the message

[Visual Basic]
Public Overridable Overloads Sub Warn( _
   ByVal formatProvider As IFormatProvider, _
   ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
) _
    Implements ILog.Warn
[C#]
public virtual void Warn(
   IFormatProvider formatProvider,
   Action<FormatMessageHandlerformatMessageCallback
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Implements

ILog.Warn

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Warn Overload List