Show / Hide Table of Contents

# Class IgniteNLogLogger

Ignite NLog integration.

##### Inheritance

System.Object
IgniteNLogLogger

##### 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.NLog

###### Assembly: Apache.Ignite.NLog.dll

##### Syntax

    public class IgniteNLogLogger : ILogger

### Constructors

#### IgniteNLogLogger()

Initializes a new instance of the IgniteNLogLogger class using the NLog.LogManager.GetCurrentClassLogger to retrieve the NLog logger.

##### Declaration

    public IgniteNLogLogger()

#### IgniteNLogLogger(Logger)

Initializes a new instance of the IgniteNLogLogger class.

##### Declaration

    public IgniteNLogLogger(Logger logger)

##### Parameters

Type | Name | Description
--- | --- | ---
NLog.Logger | logger | The NLog logger instance.

### Methods

#### ConvertLogLevel(LogLevel)

Converts the Ignite LogLevel to the NLog log level.

##### Declaration

    public static LogLevel ConvertLogLevel(LogLevel level)

##### Parameters

Type | Name | Description
--- | --- | ---
LogLevel | level | The Ignite log level.

##### Returns

Type | Description
--- | ---
NLog.LogLevel | Corresponding NLog log level.

#### 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

##### Exceptions

Type | Condition
--- | ---
System.NotImplementedException |

#### 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.

##### Exceptions

Type | Condition
--- | ---
System.NotImplementedException |

### Implements

ILogger