Class Log

  • All Implemented Interfaces:

    
    public class Log
    
                        

    Logging class to handle log levels and platform-specific log output

    • Constructor Detail

    • 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 name
        source - the source of the information to be logged
        format - the string format to be logged
        params - 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 name
        source - the source of the information to be logged
        format - the string format to be logged
        params - 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 name
        source - the source of the information to be logged
        format - the string format to be logged
        params - 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 name
        source - the source of the information to be logged
        format - the string format to be logged
        params - values to be inserted into the format