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
logLevel
LogLevelSelected log level.
Returns
- bool
A value whether indicating
logLevel
is enabled.
Log(LogLevel, string, ILisrtModule)
Logs text with LogLevel.
void Log(LogLevel loglevel, string message, ILisrtModule module = null)
Parameters
loglevel
LogLevelLevel for the log.
message
stringMessage to log.
module
ILisrtModuleModule 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
moduleName
stringFull module name where the log comes from.
direction
TransmissionDirectionThe direction of communication.
data
stringThe sent data as string.
comment
stringAn additional comment. This should be th name of the calling function.
LogMessage(IMessage)
Logs a message.
void LogMessage(IMessage message)
Parameters
message
IMessageMessage that is logged.
LogMessage(IMessage, StackTrace)
Logs the message which implements IMessage.
void LogMessage(IMessage message, StackTrace stackTrace)
Parameters
message
IMessageMessage to log with IMessage-Interface.
stackTrace
StackTraceStackTrace with the correct Stack where the Log happened.