Interface ILogger
Interface to be implemented to consume log from the library.
Instances of implemented classes are obtained by the library through the ILoggerProvider instance set on LightstreamerClient.setLoggerProvider.
Namespace: com.lightstreamer.log
Assembly: Lightstreamer.DotNetStandard.Client.Api.dll
Syntax
public interface ILogger
Properties
IsDebugEnabled
Checks if this logger is enabled for the Debug level.
The property should be true if this logger is enabled for Debug events, false otherwise.
This property is intended to lessen the computational cost of disabled log Debug statements. Note that even if the property is false, Debug log lines may be received anyway by the Debug methods.
Declaration
bool IsDebugEnabled { get; }
Property Value
Type | Description |
---|---|
bool |
IsErrorEnabled
Checks if this logger is enabled for the Error level.
The property should be true if this logger is enabled for Error events, false otherwise.
This property is intended to lessen the computational cost of disabled log Error statements. Note that even if the property is false, Error log lines may be received anyway by the Error methods.
Declaration
bool IsErrorEnabled { get; }
Property Value
Type | Description |
---|---|
bool |
IsFatalEnabled
Checks if this logger is enabled for the Fatal level.
The property should be true if this logger is enabled for Fatal events, false otherwise.
This property is intended to lessen the computational cost of disabled log Fatal statements. Note that even if the property is false, Fatal log lines may be received anyway by the Fatal methods.
Declaration
bool IsFatalEnabled { get; }
Property Value
Type | Description |
---|---|
bool |
IsInfoEnabled
Checks if this logger is enabled for the Info level.
The property should be true if this logger is enabled for Info events, false otherwise.
This property is intended to lessen the computational cost of disabled log Info statements. Note that even if the property is false, Info log lines may be received anyway by the Info methods.
Declaration
bool IsInfoEnabled { get; }
Property Value
Type | Description |
---|---|
bool |
IsTraceEnabled
Checks if this logger is enabled for the Trace level.
The property should be true if this logger is enabled for Trace events, false otherwise.
This property is intended to lessen the computational cost of disabled log Trace statements. Note that even if the property is false, Trace log lines may be received anyway by the Trace methods.
Declaration
bool IsTraceEnabled { get; }
Property Value
Type | Description |
---|---|
bool |
IsWarnEnabled
Checks if this logger is enabled for the Warn level.
The property should be true if this logger is enabled for Warn events, false otherwise.
This property is intended to lessen the computational cost of disabled log Warn statements. Note that even if the property is false, Warn log lines may be received anyway by the Warn methods.
Declaration
bool IsWarnEnabled { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
Debug(string, Exception)
Receives log messages at Debug level and a related exception.
Declaration
void Debug(string line, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
string | line | The message to be logged. |
Exception | exception | An Exception instance related to the current log message. |
Error(string, Exception)
Receives log messages at Error level and a related exception.
Declaration
void Error(string line, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
string | line | The message to be logged. |
Exception | exception | An Exception instance related to the current log message. |
Fatal(string, Exception)
Receives log messages at Fatal level and a related exception.
Declaration
void Fatal(string line, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
string | line | The message to be logged. |
Exception | exception | An Exception instance related to the current log message. |
Info(string, Exception)
Receives log messages at Info level and a related exception.
Declaration
void Info(string line, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
string | line | The message to be logged. |
Exception | exception | An Exception instance related to the current log message. |
Trace(string, Exception)
Receives log messages at Trace level and a related exception.
Declaration
void Trace(string line, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
string | line | The message to be logged. |
Exception | exception | An Exception instance related to the current log message. |
Warn(string, Exception)
Receives log messages at Warn level and a related exception.
Declaration
void Warn(string line, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
string | line | The message to be logged. |
Exception | exception | An Exception instance related to the current log message. |