Interface ILogger
Represents an interface for all loggers to be accessible by the MessageService.
public interface ILogger
Properties
Name
Gets the name for the logger.
string Name { get; }
Property Value
Methods
IsEnabled(LogLevel)
Returns a value whether indicating logLevel is enabled.
bool IsEnabled(LogLevel logLevel)
Parameters
logLevelLogLevelSelected log level.
Returns
- bool
A value whether indicating
logLevelis enabled.
Log(LogLevel, string, ILisrtModule)
Logs text with LogLevel.
void Log(LogLevel loglevel, string message, ILisrtModule module = null)
Parameters
loglevelLogLevelLevel for the log.
messagestringMessage to log.
moduleILisrtModuleModule where the log comes from (default = null).
LogCommunication(string, TransmissionDirection, string, string)
Logs the communication of a device.
void LogCommunication(string moduleName, TransmissionDirection direction, string data, string comment = "")
Parameters
moduleNamestringFull module name where the log comes from.
directionTransmissionDirectionThe direction of communication.
datastringThe sent data as string.
commentstringAn additional comment. This should be th name of the calling function.
LogMessage(IMessage)
Logs a message.
void LogMessage(IMessage message)
Parameters
messageIMessageMessage that is logged.
LogMessage(IMessage, StackTrace)
Logs the message which implements IMessage.
void LogMessage(IMessage message, StackTrace stackTrace)
Parameters
messageIMessageMessage to log with IMessage-Interface.
stackTraceStackTraceStackTrace with the correct Stack where the Log happened.