Class CategoryLogger
Wrapping logger with a predefined category.
When Log(LogLevel, string, object[], IFormatProvider, string, string, Exception) method is called, andcategory parameter is null, predefined category
will be used.
Implements
Inherited Members
Namespace: Apache.Ignite.Core.Log
Assembly: Apache.Ignite.Core.dll
Syntax
public class CategoryLogger : ILogger
Constructors
CategoryLogger(ILogger, string)
Initializes a new instance of the CategoryLogger class.
Declaration
public CategoryLogger(ILogger logger, string category)
Parameters
| Type | Name | Description |
|---|---|---|
| ILogger | logger | The logger to wrap. |
| string | category | The category. |
Methods
IsEnabled(LogLevel)
Determines whether the specified log level is enabled.
Declaration
public bool IsEnabled(LogLevel level)
Parameters
| Type | Name | Description |
|---|---|---|
| LogLevel | level | The level. |
Returns
| Type | Description |
|---|---|
| bool | Value indicating whether the specified log level is enabled |
Log(LogLevel, string, object[], IFormatProvider, string, string, Exception)
Logs the specified message.
Declaration
public void Log(LogLevel level, string message, object[] args, IFormatProvider formatProvider, string category, string nativeErrorInfo, Exception ex)
Parameters
| Type | Name | Description |
|---|---|---|
| LogLevel | level | The level. |
| string | message | The message. |
| object[] | args | The arguments to format |
| IFormatProvider | formatProvider | The format provider. Can be null if |
| string | category | The logging category name. |
| string | nativeErrorInfo | The native error information. |
| Exception | ex | The exception. Can be null. |