Interface ILogger
Describes an object that can be used to write log messages through.
Namespace: EPiServer.Logging
Assembly: EPiServer.Framework.dll
Version: 11.20.7Syntax
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>, Type)
Logs the provided state
with the specified level.
Declaration
void Log<TState, TException>(Level level, TState state, TException exception, Func<TState, TException, string> messageFormatter, Type boundaryType)
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. |
System.Type | boundaryType | The type at the boundary of the logging framework facing the code using the logging. |
Type Parameters
Name | Description |
---|---|
TState | The type of the state object. |
TException | The type of the exception. |