LSLogger

public protocol LSLogger

Interface to be implemented to consume log from the library.

Instances of implemented classes are obtained by the library through the LSLoggerProvider instance set on LightstreamerClient.setLoggerProvider(...).

  • Receives log messages at Error level.

    Declaration

    Swift

    func error(_ line: String)

    Parameters

    line

    The message to be logged.

  • Receives log messages at Error level and a related exception.

    Declaration

    Swift

    func error(_ line: String, withException exception: Error)

    Parameters

    line

    The message to be logged.

    exception

    An Error instance related to the current log message.

  • Receives log messages at Warn level.

    Declaration

    Swift

    func warn(_ line: String)

    Parameters

    line

    The message to be logged.

  • Receives log messages at Warn level and a related exception.

    Declaration

    Swift

    func warn(_ line: String, withException exception: Error)

    Parameters

    line

    The message to be logged.

    exception

    An Error instance related to the current log message.

  • Receives log messages at Info level.

    Declaration

    Swift

    func info(_ line: String)

    Parameters

    line

    The message to be logged.

  • Receives log messages at Info level and a related exception.

    Declaration

    Swift

    func info(_ line: String, withException exception: Error)

    Parameters

    line

    The message to be logged.

    exception

    An Error instance related to the current log message.

  • Receives log messages at Debug level.

    Declaration

    Swift

    func debug(_ line: String)

    Parameters

    line

    The message to be logged.

  • Receives log messages at Debug level and a related exception.

    Declaration

    Swift

    func debug(_ line: String, withException exception: Error)

    Parameters

    line

    The message to be logged.

    exception

    An Error instance related to the current log message.

  • Receives log messages at Trace level.

    Declaration

    Swift

    func trace(_ line: String)

    Parameters

    line

    The message to be logged.

  • Receives log messages at Trace level and a related exception.

    Declaration

    Swift

    func trace(_ line: String, withException exception: Error)

    Parameters

    line

    The message to be logged.

    exception

    An Error instance related to the current log message.

  • Receives log messages at Fatal level.

    Declaration

    Swift

    func fatal(_ line: String)

    Parameters

    line

    The message to be logged.

  • Receives log messages at Fatal level and a related exception.

    Declaration

    Swift

    func fatal(_ line: String, withException exception: Error)

    Parameters

    line

    The message to be logged.

    exception

    An Error instance related to the current log message.

  • 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

    Swift

    var isTraceEnabled: Bool { get }
  • 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

    Swift

    var isDebugEnabled: Bool { get }
  • 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

    Swift

    var isInfoEnabled: Bool { get }
  • 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

    Swift

    var isWarnEnabled: Bool { get }
  • 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

    Swift

    var isErrorEnabled: Bool { get }
  • 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

    Swift

    var isFatalEnabled: Bool { get }