Class FileSdkLogger
java.lang.Object
com.sportradar.livedata.sdk.common.classes.BaseSdkLogger
com.sportradar.livedata.sdk.common.classes.FileSdkLogger
- All Implemented Interfaces:
- SdkLogger
File SDK logger implementation.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic Stringstatic final StringFields inherited from class com.sportradar.livedata.sdk.common.classes.BaseSdkLoggeralertLogger, clientInteractionLogger, invalidMessageLogger, logger, rootExecLogger, trafficLogger, usingLogback
- 
Constructor SummaryConstructorsConstructorDescriptionFileSdkLogger(LoggerSettings loggerSettings, Timer timer) FileSdkLogger(LoggerSettings loggerSettings, Timer timer, String markerName) 
- 
Method SummaryModifier and TypeMethodDescriptionstatic SdkLogAppenderTypegetAppenderType(String appenderName) Return enum of typeSdkLogAppenderTypefrom a given appender name.static ch.qos.logback.classic.LevelbooleanisDebugEnabled(SdkLogAppenderType appenderType) Return true when logger with given appender type have current log level equal to debug, otherwise return false.booleanisErrorEnabled(SdkLogAppenderType appenderType) Return true when logger with given appender type have current log level equal to error, otherwise return false.booleanisInfoEnabled(SdkLogAppenderType appenderType) Return true when logger with given appender type have current log level equal to info, otherwise return false.booleanisLevelEnabled(ch.qos.logback.classic.Level level, SdkLogAppenderType appenderType) Return true when logger with given appender type have current log level equal to given level, otherwise false.booleanisTraceEnabled(SdkLogAppenderType appenderType) Return true when logger with given appender type have current log level equal to trace, otherwise return false.booleanisWarnEnabled(SdkLogAppenderType appenderType) Return true when logger with given appender type have current log level equal to warn, otherwise return false.protected voidvoidSDK will generate and signal alerts in case of any special events.voidSDK will generate and signal alerts in case of any special events.voidlogClientInteraction(ch.qos.logback.classic.Level level, String message) All interaction with the client software on the SDK interface level will be logged in a separate client communication log.voidlogClientInteraction(ch.qos.logback.classic.Level level, String message, Exception exception) All interaction with the client software on the SDK interface level will be logged in a separate client communication log.voidlogClientInteraction(ch.qos.logback.classic.Level level, String message, org.joda.time.Duration interval, Exception exception) All interaction with the client software on the SDK interface level will be logged in a separate client communication log.voidlogInvalidMessage(ch.qos.logback.classic.Level level, String message) 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).voidlogTraffic(boolean outgoing, String message) Depending on configuration SDK will be able to dump all feed XML traffic into dedicated traffic logs.voidlogTraffic(String message) Dump given message to traffic log.voidlogWithException(org.slf4j.Logger logger, ch.qos.logback.classic.Level level, String message, Exception exception) 
- 
Field Details- 
LOG_COMMON- See Also:
 
- 
LOG_SUFFIX- See Also:
 
- 
ZIP_SUFFIX- See Also:
 
- 
LOG_PATTERN- See Also:
 
- 
ROOT_NS
 
- 
- 
Constructor Details- 
FileSdkLogger- Throws:
- SdkException
 
- 
FileSdkLoggerpublic FileSdkLogger(LoggerSettings loggerSettings, Timer timer, String markerName) throws SdkException - Throws:
- SdkException
 
 
- 
- 
Method Details- 
getAppenderTypeReturn enum of typeSdkLogAppenderTypefrom a given appender name.- Parameters:
- appenderName- specified appender type name
- Returns:
- appender type of type SdkLogAppenderTypefrom given appender name
 
- 
getLevel
- 
isDebugEnabledReturn true when logger with given appender type have current log level equal to debug, otherwise return false.- Specified by:
- isDebugEnabledin interface- SdkLogger
- Parameters:
- appenderType- specified appender type
- Returns:
- true when logger with appender type have current level equal to debug, otherwise false
 
- 
isErrorEnabledReturn true when logger with given appender type have current log level equal to error, otherwise return false.- Specified by:
- isErrorEnabledin interface- SdkLogger
- Parameters:
- appenderType- specified appender type
- Returns:
- true when logger with appender type have current level equal to error, otherwise false
 
- 
isInfoEnabledReturn true when logger with given appender type have current log level equal to info, otherwise return false.- Specified by:
- isInfoEnabledin interface- SdkLogger
- Parameters:
- appenderType- specified appender type
- Returns:
- true when logger with appender type have current level equal to info, otherwise false
 
- 
isLevelEnabledReturn true when logger with given appender type have current log level equal to given level, otherwise false.- Specified by:
- isLevelEnabledin interface- SdkLogger
- Parameters:
- level- specified level
- appenderType- specified appender type
- Returns:
- truewhen logger with appender type have current level equal to level, otherwise- false
 
- 
isTraceEnabledReturn true when logger with given appender type have current log level equal to trace, otherwise return false.- Specified by:
- isTraceEnabledin interface- SdkLogger
- Parameters:
- appenderType- specified appender type
- Returns:
- true when logger with appender type have current level equal to trace, otherwise false
 
- 
isWarnEnabledReturn true when logger with given appender type have current log level equal to warn, otherwise return false.- Specified by:
- isWarnEnabledin interface- SdkLogger
- Parameters:
- appenderType- specified appender type
- Returns:
- true when logger with appender type have current level equal to warn, otherwise false
 
- 
logAlertSDK 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.
- 
logAlertSDK 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.
- 
logClientInteractionAll 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.- Specified by:
- logClientInteractionin interface- SdkLogger
- Parameters:
- level- Log level
- message- String message
 
- 
logClientInteractionpublic void logClientInteraction(ch.qos.logback.classic.Level level, String message, Exception exception) Description copied from interface:SdkLoggerAll 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.- Specified by:
- logClientInteractionin interface- SdkLogger
- Parameters:
- level- Log level
- message- String message
- exception- Optional exception
 
- 
logClientInteractionpublic void logClientInteraction(ch.qos.logback.classic.Level level, String message, org.joda.time.Duration interval, Exception exception) Description copied from interface:SdkLoggerAll 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.- Specified by:
- logClientInteractionin interface- SdkLogger
- Parameters:
- level- Log level
- message- String message
- interval- Elapsed time while processing client request or client handler invocation (optional)
- exception- Optional exception
 
- 
logInvalidMessageCorrupt 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).- Specified by:
- logInvalidMessagein interface- SdkLogger
- Parameters:
- level- Log level
- message- Invalid message
 
- 
logTrafficDepending 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.- Specified by:
- logTrafficin interface- SdkLogger
- Parameters:
- outgoing- when true it specifies a message the SDK has sent; false means that a message SDK received
- message- Message that was either read or written to the communication channel
 
- 
logTrafficDump given message to traffic log.- Specified by:
- logTrafficin interface- SdkLogger
- Parameters:
- message- Message that was either read or written to the channel
 
- 
logprotected void log(ch.qos.logback.classic.Logger logger, ch.qos.logback.classic.Level level, String message) - Specified by:
- login class- BaseSdkLogger
 
- 
logWithExceptionpublic void logWithException(org.slf4j.Logger logger, ch.qos.logback.classic.Level level, String message, Exception exception) - Specified by:
- logWithExceptionin class- BaseSdkLogger
 
 
-