Interface ILogger
Logger abstract interface.
Namespace: Kephas.Logging
Assembly: Kephas.Core.dll
Syntax
public interface ILogger
Methods
| Improve this Doc View SourceIsEnabled(LogLevel)
Indicates whether logging at the indicated level is enabled.
Declaration
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
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.