Interface ILogger
NOTE: This is a pre-release API that is UNSTABLE and might not satisfy the compatibility requirements as denoted by its associated normal version. Describes an object that can be used to write log messages through.
Namespace: EPiServer.Logging
Assembly: EPiServer.Framework.dll
Version: 8.11.0Syntax
public interface ILogger
Methods
IsEnabled(Level)
Determines whether logging at the specified level is enabled.
Declaration
bool IsEnabled(Level level)
Parameters
Type | Name | Description |
---|---|---|
Level | level | The level to check. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Log<TState, TException>(Level, TState, TException, Func<TState, TException, String>)
Logs the provided state
with the specified level.
Declaration
void Log<TState, TException>(Level level, TState state, TException exception, Func<TState, TException, string> messageFormatter)
where TException : Exception
Parameters
Type | Name | Description |
---|---|---|
Level | level | The criticality level of the log message. |
TState | state | The state that should be logged. |
TException | exception | The exception that should be logged. |
System.Func<TState, TException, System.String> | messageFormatter | The message formatter used to write the state to the log provider. |
Type Parameters
Name | Description |
---|---|
TState | The type of the state object. |
TException | The type of the exception. |