Show / Hide Table of Contents

Class ModbusLogger

Base class for Modbus loggers.

Inheritance
System.Object
ModbusLogger
DebugModbusLogger
Implements
IModbusLogger
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 Source

ModbusLogger(LoggingLevel)

Declaration
protected ModbusLogger(LoggingLevel minimumLoggingLevel)
Parameters
Type Name Description
LoggingLevel minimumLoggingLevel

Properties

| Improve this Doc View Source

MinimumLoggingLevel

Declaration
protected LoggingLevel MinimumLoggingLevel { get; }
Property Value
Type Description
LoggingLevel

Methods

| Improve this Doc View Source

Log(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
| Improve this Doc View Source

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
| Improve this Doc View Source

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

Implements

IModbusLogger

Extension Methods

LoggingExtensions.Trace(IModbusLogger, String)
LoggingExtensions.Debug(IModbusLogger, String)
LoggingExtensions.Information(IModbusLogger, String)
LoggingExtensions.Warning(IModbusLogger, String)
LoggingExtensions.Error(IModbusLogger, String)
LoggingExtensions.Critical(IModbusLogger, String)
LoggingExtensions.Log(IModbusLogger, LoggingLevel, Func<String>)
LoggingExtensions.Trace(IModbusLogger, Func<String>)
LoggingExtensions.Debug(IModbusLogger, Func<String>)
LoggingExtensions.Information(IModbusLogger, Func<String>)
LoggingExtensions.Warning(IModbusLogger, Func<String>)
LoggingExtensions.Error(IModbusLogger, Func<String>)
LoggingExtensions.Critical(IModbusLogger, Func<String>)
  • Improve this Doc
  • View Source
Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX