Show / Hide Table of Contents

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 Server.SetLoggerProvider.

Namespace: Lightstreamer.DotNet.Server.Log
Assembly: DotNetStandardAdapter.dll
Syntax
public interface ILogger

Properties

IsDebugEnabled

Declaration
bool IsDebugEnabled { get; }
Property Value
Type Description
bool

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.

IsErrorEnabled

Declaration
bool IsErrorEnabled { get; }
Property Value
Type Description
bool

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.

IsFatalEnabled

Declaration
bool IsFatalEnabled { get; }
Property Value
Type Description
bool

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.

IsInfoEnabled

Declaration
bool IsInfoEnabled { get; }
Property Value
Type Description
bool

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.

IsWarnEnabled

Declaration
bool IsWarnEnabled { get; }
Property Value
Type Description
bool

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.

Methods

Debug(string)

Receives log messages at Debug level.

Declaration
void Debug(string line)
Parameters
Type Name Description
string line

The message to be logged.

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)

Receives log messages at Error level.

Declaration
void Error(string line)
Parameters
Type Name Description
string line

The message to be logged.

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)

Receives log messages at Fatal level.

Declaration
void Fatal(string line)
Parameters
Type Name Description
string line

The message to be logged.

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)

Receives log messages at Info level.

Declaration
void Info(string line)
Parameters
Type Name Description
string line

The message to be logged.

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.

Warn(string)

Receives log messages at Warn level.

Declaration
void Warn(string line)
Parameters
Type Name Description
string line

The message to be logged.

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.

In this article
Back to top Copyright (c) 2004-2023 Lightstreamer s.r.l.