 | ILoggerExtensionsLog Method (ILogger, Level, Exception, String, Object) |
Writes a Log message for an exception.
Namespace: Bobs.LumberjackAssembly: Bobs.Lumberjack (in Bobs.Lumberjack.dll) Version: 0.1.0-dev001
Syntaxpublic static void Log(
this ILogger logger,
Level level,
Exception exception,
string message,
params Object[] args
)
<ExtensionAttribute>
Public Shared Sub Log (
logger As ILogger,
level As Level,
exception As Exception,
message As String,
ParamArray args As Object()
)
public:
[ExtensionAttribute]
static void Log(
ILogger^ logger,
Level level,
Exception^ exception,
String^ message,
... array<Object^>^ args
)
[<ExtensionAttribute>]
static member Log :
logger : ILogger *
level : Level *
exception : Exception *
message : string *
args : Object[] -> unit
Parameters
- logger
- Type: Bobs.LumberjackILogger
The logger to log with. - level
- Type: Bobs.LumberjackLevel
The level at which to log. - exception
- Type: SystemException
The exception. - message
- Type: SystemString
The message. - args
- Type: SystemObject
Optional format arguments.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
ILogger. 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).
See Also