Class SerilogLogger
The Serilog logger adapter.
Inheritance
System.Object
SerilogLogger
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Logging.Serilog
Assembly: Kephas.Logging.Serilog.dll
Syntax
public class SerilogLogger : ILogger
Methods
| Improve this Doc View SourceIsEnabled(LogLevel)
Indicates whether logging at the indicated level is enabled.
Declaration
public bool IsEnabled(LogLevel level)
Parameters
Type | Name | Description |
---|---|---|
LogLevel | level | The logging level. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Log(LogLevel, Exception, String, Object[])
Logs the information at the provided level.
Declaration
public void Log(LogLevel level, Exception exception, string messageFormat, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
LogLevel | level | The logging level. |
System.Exception | exception | The exception. |
System.String | messageFormat | The message format. |
System.Object[] | args | The arguments for the message format. |
Remarks
Note for implementors: the exception
may be null
, so be cautious and handle this case too.
For example, the Log(ILogger, LogLevel, String, Object[]) extension method passes a null
exception.