Show / Hide Table of Contents

# Class CategoryLogger

Wrapping logger with a predefined category.

When Log(LogLevel, String, Object[], IFormatProvider, String, String, Exception) method is called, and `category` parameter is null, predefined category will be used.

##### Inheritance

System.Object
CategoryLogger

##### Implements

ILogger

##### Inherited Members

System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()

###### 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.
System.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
--- | ---
System.Boolean | 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.
System.String | message | The message.
System.Object[] | args | The arguments to format `message`. Can be null (formatting will not occur).
System.IFormatProvider | formatProvider | The format provider. Can be null if `args` is null.
System.String | category | The logging category name.
System.String | nativeErrorInfo | The native error information.
System.Exception | ex | The exception. Can be null.

### Implements

ILogger

### Extension Methods

LoggerExtensions.Trace(ILogger, String)
LoggerExtensions.Trace(ILogger, String, Object[])
LoggerExtensions.Trace(ILogger, Exception, String)
LoggerExtensions.Trace(ILogger, Exception, String, Object[])
LoggerExtensions.Debug(ILogger, String)
LoggerExtensions.Debug(ILogger, String, Object[])
LoggerExtensions.Debug(ILogger, Exception, String)
LoggerExtensions.Debug(ILogger, Exception, String, Object[])
LoggerExtensions.Info(ILogger, String)
LoggerExtensions.Info(ILogger, String, Object[])
LoggerExtensions.Info(ILogger, Exception, String)
LoggerExtensions.Info(ILogger, Exception, String, Object[])
LoggerExtensions.Warn(ILogger, String)
LoggerExtensions.Warn(ILogger, String, Object[])
LoggerExtensions.Warn(ILogger, Exception, String)
LoggerExtensions.Warn(ILogger, Exception, String, Object[])
LoggerExtensions.Error(ILogger, String)
LoggerExtensions.Error(ILogger, String, Object[])
LoggerExtensions.Error(ILogger, Exception, String)
LoggerExtensions.Error(ILogger, Exception, String, Object[])
LoggerExtensions.Log(ILogger, LogLevel, String)
LoggerExtensions.Log(ILogger, LogLevel, String, Object[])
LoggerExtensions.Log(ILogger, LogLevel, Exception, String)
LoggerExtensions.Log(ILogger, LogLevel, Exception, String, Object[])
LoggerExtensions.GetLogger(ILogger, String)
LoggerExtensions.GetLogger(ILogger, Type)