Class ModbusLogger
Base class for Modbus loggers.
Implements
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: NModbus.Logging
Assembly: NModbus.dll
Syntax
public abstract class ModbusLogger : IModbusLogger
Constructors
| Improve this Doc View SourceModbusLogger(LoggingLevel)
Declaration
protected ModbusLogger(LoggingLevel minimumLoggingLevel)
Parameters
Type | Name | Description |
---|---|---|
LoggingLevel | minimumLoggingLevel |
Properties
| Improve this Doc View SourceMinimumLoggingLevel
Declaration
protected LoggingLevel MinimumLoggingLevel { get; }
Property Value
Type | Description |
---|---|
LoggingLevel |
Methods
| Improve this Doc View SourceLog(LoggingLevel, String)
Log the specified message at the specified level.
Declaration
public void Log(LoggingLevel level, string message)
Parameters
Type | Name | Description |
---|---|---|
LoggingLevel | level | |
System.String | message |
LogCore(LoggingLevel, String)
Override this method to implement logging behavior. This function will only be called if ShouldLog(level) is true.
Declaration
protected abstract void LogCore(LoggingLevel level, string message)
Parameters
Type | Name | Description |
---|---|---|
LoggingLevel | level | |
System.String | message |
ShouldLog(LoggingLevel)
Returns true if the level should be loggged, false otherwise.
Declaration
public bool ShouldLog(LoggingLevel level)
Parameters
Type | Name | Description |
---|---|---|
LoggingLevel | level |
Returns
Type | Description |
---|---|
System.Boolean |