Table of Contents

Class SafeSdkLogger

Namespace
Sportradar.LiveData.Sdk.Services.SdkLogger
Assembly
Sportradar.LiveData.Sdk.dll
public class SafeSdkLogger : ISdkLogger
Inheritance
SafeSdkLogger
Implements
Inherited Members

Constructors

SafeSdkLogger()

public SafeSdkLogger()

Methods

IsDebugEnabled(SdkLogAppenderType)

public bool IsDebugEnabled(SdkLogAppenderType appender_type)

Parameters

appender_type SdkLogAppenderType

Returns

bool

IsErrorEnabled(SdkLogAppenderType)

public bool IsErrorEnabled(SdkLogAppenderType appender_type)

Parameters

appender_type SdkLogAppenderType

Returns

bool

IsFatalEnabled(SdkLogAppenderType)

public bool IsFatalEnabled(SdkLogAppenderType appender_type)

Parameters

appender_type SdkLogAppenderType

Returns

bool

IsInfoEnabled(SdkLogAppenderType)

public bool IsInfoEnabled(SdkLogAppenderType appender_type)

Parameters

appender_type SdkLogAppenderType

Returns

bool

IsLevelEnabled(Level, SdkLogAppenderType)

public bool IsLevelEnabled(Level level, SdkLogAppenderType appender_type)

Parameters

level Level
appender_type SdkLogAppenderType

Returns

bool

IsWarnEnabled(SdkLogAppenderType)

public bool IsWarnEnabled(SdkLogAppenderType appender_type)

Parameters

appender_type SdkLogAppenderType

Returns

bool

LogAlert(Level, string, Exception)

SDK will generate and signal alerts in case of any special events. This could happen when network connection is dropped, rate-limiting thresholds are exceeded, when going over queue low/high watermarks, when feed error recovery is in progress, if persistent state store gets out-of-sync, when event dispatching is put on pause, when SDK library is reloaded, current status of login sequence, etc. Alerts will be dumped into dedicated alert logs. Special alerts (configurable) could be logged to other log appenders, like SMTP appender, NT Event Log appender or JmxLogger appender.

public void LogAlert(Level level, string msg, Exception e = null)

Parameters

level Level

Log level

msg string

Alert message

e Exception

Optional exception

LogClientInteraction(Level, string, Exception)

All interaction with the client software on the SDK interface level will be logged in a separate client communication log. This includes all method invocations on the SDK interface including parameter values, request parameter validation errors and other errors returned by the SDK, unhandled client exceptions, errors reported by the client handlers, timings of each call, etc.

public void LogClientInteraction(Level level, string msg, Exception e = null)

Parameters

level Level

Log level

msg string

String message

e Exception

Optional exception

LogClientInteraction(Level, string, TimeSpan, Exception)

All interaction with the client software on the SDK interface level will be logged in a separate client communication log. This includes all method invocations on the SDK interface including parameter values, request parameter validation errors and other errors returned by the SDK, unhandled client exceptions, errors reported by the client handlers, timings of each call, etc.

public void LogClientInteraction(Level level, string msg, TimeSpan time_elapsed, Exception e = null)

Parameters

level Level

Log level

msg string

String message

time_elapsed TimeSpan

Elapsed time while processing client request or client handler invocation

e Exception

Optional exception

LogConfiguration(Level, string, Exception)

SDK will keep a track of all SDK configuration settings used by the client. Configuration settings are loaded at startup and are also periodically pulled from the configuration server.

public void LogConfiguration(Level level, string msg, Exception e = null)

Parameters

level Level

Log level

msg string

Configuration settings (key-value tuples) dumped into message

e Exception

Optional exception

LogDeadLetter(Level, string)

Logs dead letter messages that are otherwise redirected to client provided dead letter queue.

public void LogDeadLetter(Level level, string msg)

Parameters

level Level

Log level

msg string

Dead letter message

LogInvalidMessage(Level, string)

Corrupt input feed data will be dumped into log files dedicated to corrupt input data (could be garbage and not even text, exceeding max buffer size). Invalid input messages will be dumped into log files dedicated to invalid input messages (text, but not necessarily XML).

public void LogInvalidMessage(Level level, string msg)

Parameters

level Level

Log level

msg string

Invalid message

LogStatistics(Level, string)

SDK will keep a track of some traffic, queue, performance and error statistics. Aggregated snapshots of these statistics will be periodically flushed into statistics logs.

public void LogStatistics(Level level, string msg)

Parameters

level Level

Log level

msg string

Statistics dumped into message

LogTraffic(Level, string)

Depending on configuration SDK will be able to dump all feed XML traffic into dedicated traffic logs. This data is already logged at the feed server level but here the client will have possibility to configure traffic log filters based on the type of message, level of detail, match id, etc.

public void LogTraffic(Level level, string msg)

Parameters

level Level

Log level

msg string

Message that was either read or written to the communication channel

Start()

public void Start()

Stop()

public void Stop()