ILogExtensions WarnFormatExt Method (ILog, IFormatProvider, String, Object ) | Apache log4net™ SDK Documentation

Logs a formatted message string with the Warn level.

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

C#
VB
C++
F#
Copy

    public static void WarnFormatExt(
    	this ILog logger,
    	IFormatProvider provider,
    	string format,
    	params Object[] args
    )

    <ExtensionAttribute>
    Public Shared Sub WarnFormatExt (
    	logger As ILog,
    	provider As IFormatProvider,
    	format As String,
    	ParamArray args As Object()
    )

    public:
    [ExtensionAttribute]
    static void WarnFormatExt(
    	ILog^ logger,
    	IFormatProvider^ provider,
    	String^ format,
    	... array<Object^>^ args
    )

    [<ExtensionAttribute>]
    static member WarnFormatExt :
            logger : ILog *
            provider : IFormatProvider *
            format : string *
            args : Object[] -> unit

#### Parameters

logger
  Type: log4net
  ILog
  The logger on which the message is logged.
provider
  Type: System
  IFormatProvider
  An IFormatProvider that supplies culture-specific formatting information
format
  Type: System
  String
  A String containing zero or more format items
args
  Type:
  System
  Object
  An Object array containing zero or more objects to format

#### Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ILog. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks

The message is formatted using the String.Format method. See Format(String,
Object
) for details of the syntax of the format string and the behavior of the formatting.

This method does not take an Exception object to include in the log event. To pass an Exception use one of the WarnExt(ILog, Object, Exception) methods instead.

See Also

#### Reference

ILogExtensions Class
WarnFormatExt Overload
log4net.Util Namespace
ILog
Warn(Object)
ILog
IsWarnEnabled