Class NLogger
The NLog logger adapter.
Inheritance
System.Object
NLogger
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Logging.NLog
Assembly: Kephas.Logging.NLog.dll
Syntax
public class NLogger : ILogger
Constructors
| Improve this Doc View SourceNLogger(Logger)
Initializes a new instance of the NLogger class.
Declaration
protected NLogger(Logger logger)
Parameters
Type | Name | Description |
---|---|---|
NLog.Logger | logger | The NLog logger. |
Methods
| Improve this Doc View SourceIsEnabled(LogLevel)
Indicates whether logging at the indicated level is enabled.
Declaration
public bool IsEnabled(LogLevel level)
Parameters
Type | Name | Description |
---|---|---|
LogLevel | level | The logging level. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Log(LogLevel, Exception, String, Object[])
Logs the information at the provided level.
Declaration
public void Log(LogLevel level, Exception exception, string messageFormat, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
LogLevel | level | The logging level. |
System.Exception | exception | The exception. |
System.String | messageFormat | The message format. |
System.Object[] | args | A variable-length parameters list containing arguments. |
Log(LogLevel, String, Object[])
Logs the information at the provided level.
Declaration
public void Log(LogLevel level, string messageFormat, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
LogLevel | level | The logging level. |
System.String | messageFormat | The message format. |
System.Object[] | args | The arguments. |