Class Log
-
- All Implemented Interfaces:
public class LogLogging class to handle log levels and platform-specific log output
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringUNEXPECTED_NULL_VALUEpublic final static StringUNEXPECTED_EMPTY_VALUEpublic final static StringINVALID_FORMAT
-
Method Summary
Modifier and Type Method Description static voidsetLogLevel(LoggingMode loggingMode)Sets the log level to operate at static LoggingModegetLogLevel()Gets the log level that the SDK is currently operating at static voidtrace(@NonNull() String extension, @NonNull() String source, @NonNull() String format, Array<Object> params)Used to print more verbose information. static voiddebug(@NonNull() String extension, @NonNull() String source, @NonNull() String format, Array<Object> params)Information provided to the debug method should contain high-level details about the data being processed. static voidwarning(@NonNull() String extension, @NonNull() String source, @NonNull() String format, Array<Object> params)Information provided to the warning method indicates that a request has been made to the SDK, but the SDK will be unable to perform the requested task. static voiderror(@NonNull() String extension, @NonNull() String source, @NonNull() String format, Array<Object> params)Information provided to the error method indicates that there has been an unrecoverable error. -
-
Method Detail
-
setLogLevel
static void setLogLevel(LoggingMode loggingMode)
Sets the log level to operate at
- Parameters:
loggingMode- LoggingMode to use for log output
-
getLogLevel
static LoggingMode getLogLevel()
Gets the log level that the SDK is currently operating at
- Returns:
LoggingMode describing the current level of logging.
-
trace
static void trace(@NonNull() String extension, @NonNull() String source, @NonNull() String format, Array<Object> params)
Used to print more verbose information. Info logging is expected to follow end-to-end every method an event hits. Prints information to the console only when the SDK is in LoggingMode: VERBOSE
- Parameters:
extension- the extension namesource- the source of the information to be loggedformat- the string format to be loggedparams- values to be inserted into the format
-
debug
static void debug(@NonNull() String extension, @NonNull() String source, @NonNull() String format, Array<Object> params)
Information provided to the debug method should contain high-level details about the data being processed. Prints information to the console only when the SDK is in LoggingMode: VERBOSE, DEBUG
- Parameters:
extension- the extension namesource- the source of the information to be loggedformat- the string format to be loggedparams- values to be inserted into the format
-
warning
static void warning(@NonNull() String extension, @NonNull() String source, @NonNull() String format, Array<Object> params)
Information provided to the warning method indicates that a request has been made to the SDK, but the SDK will be unable to perform the requested task. An example is catching an expected or unexpected but recoverable exception. Prints information to the console only when the SDK is in LoggingMode: VERBOSE, DEBUG, WARNING
- Parameters:
extension- the extension namesource- the source of the information to be loggedformat- the string format to be loggedparams- values to be inserted into the format
-
error
static void error(@NonNull() String extension, @NonNull() String source, @NonNull() String format, Array<Object> params)
Information provided to the error method indicates that there has been an unrecoverable error. Prints information to the console regardless of current LoggingMode of the SDK.
- Parameters:
extension- the extension namesource- the source of the information to be loggedformat- the string format to be loggedparams- values to be inserted into the format
-
-
-
-