Class Logger

java.lang.Object
com.trimblemaps.mapsdk.log.Logger

public final class Logger extends Object
Logger for the TrimbleMaps Maps SDK for Android

Default implementation relies on Log. Alternative implementations can be set with setLoggerDefinition(LoggerDefinition).

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
    Log level indicates which logs are allowed to be emitted by the TrimbleMaps Maps SDK for Android.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Priority constant for the println method; use Logger.d.
    static final int
    Priority constant for the println method; use Logger.e.
    static final int
    Priority constant for the println method; use Logger.i.
    static final int
    Priority constant for the println method.
    static final int
    Priority constant for the println method; use Logger.v
    static final int
    Priority constant for the println method; use Logger.w.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    d(String tag, String msg)
    Send a debug log message.
    static void
    d(String tag, String msg, Throwable tr)
    Send a debug log message and log the exception.
    static void
    e(String tag, String msg)
    Send an error log message.
    static void
    e(String tag, String msg, Throwable tr)
    Send an error log message and log the exception.
    static void
    i(String tag, String msg)
    Send an info log message.
    static void
    i(String tag, String msg, Throwable tr)
    Send an info log message and log the exception.
    static void
    log(int severity, String tag, String message)
    Send a log message based on severity.
    static void
    Replace the current used logger definition.
    static void
    setVerbosity(int logLevel)
    Set the verbosity of the Logger.
    static void
    v(String tag, String msg)
    Send a verbose log message.
    static void
    v(String tag, String msg, Throwable tr)
    Send a verbose log message and log the exception.
    static void
    w(String tag, String msg)
    Send a warning log message.
    static void
    w(String tag, String msg, Throwable tr)
    Send a warning log message and log the exception.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • VERBOSE

      public static final int VERBOSE
      Priority constant for the println method; use Logger.v

      This log level will print all logs.

      See Also:
    • DEBUG

      public static final int DEBUG
      Priority constant for the println method; use Logger.d.

      This log level will print all logs except verbose.

      See Also:
    • INFO

      public static final int INFO
      Priority constant for the println method; use Logger.i.

      This log level will print all logs except verbose and debug.

      See Also:
    • WARN

      public static final int WARN
      Priority constant for the println method; use Logger.w.

      This log level will print only warn and error logs.

      See Also:
    • ERROR

      public static final int ERROR
      Priority constant for the println method; use Logger.e.

      This log level will print only error logs.

      See Also:
    • NONE

      public static final int NONE
      Priority constant for the println method.

      This log level won't print any logs.

      See Also:
  • Constructor Details

    • Logger

      public Logger()
  • Method Details

    • setVerbosity

      public static void setVerbosity(int logLevel)
      Set the verbosity of the Logger.

      This configuration can be used to have more granular control over which logs are emitted by the TrimbleMaps Maps SDK for Android.

      Parameters:
      logLevel - the verbosity level
    • setLoggerDefinition

      public static void setLoggerDefinition(LoggerDefinition loggerDefinition)
      Replace the current used logger definition.
      Parameters:
      loggerDefinition - the definition of the logger
    • v

      public static void v(String tag, String msg)
      Send a verbose log message.
      Parameters:
      tag - Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs.
      msg - The message you would like logged.
    • v

      public static void v(String tag, String msg, Throwable tr)
      Send a verbose log message and log the exception.
      Parameters:
      tag - Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs.
      msg - The message you would like logged.
      tr - An exception to log
    • d

      public static void d(String tag, String msg)
      Send a debug log message.
      Parameters:
      tag - Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs.
      msg - The message you would like logged.
    • d

      public static void d(String tag, String msg, Throwable tr)
      Send a debug log message and log the exception.
      Parameters:
      tag - Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs.
      msg - The message you would like logged.
      tr - An exception to log
    • i

      public static void i(String tag, String msg)
      Send an info log message.
      Parameters:
      tag - Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs.
      msg - The message you would like logged.
    • i

      public static void i(String tag, String msg, Throwable tr)
      Send an info log message and log the exception.
      Parameters:
      tag - Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs.
      msg - The message you would like logged.
      tr - An exception to log
    • w

      public static void w(String tag, String msg)
      Send a warning log message.
      Parameters:
      tag - Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs.
      msg - The message you would like logged.
    • w

      public static void w(String tag, String msg, Throwable tr)
      Send a warning log message and log the exception.
      Parameters:
      tag - Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs.
      msg - The message you would like logged.
      tr - An exception to log
    • e

      public static void e(String tag, String msg)
      Send an error log message.
      Parameters:
      tag - Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs.
      msg - The message you would like logged.
    • e

      public static void e(String tag, String msg, Throwable tr)
      Send an error log message and log the exception.
      Parameters:
      tag - Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs.
      msg - The message you would like logged.
      tr - An exception to log
    • log

      public static void log(int severity, String tag, String message)
      Send a log message based on severity.
      Parameters:
      severity - the log severity
      tag - Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs.
      message - The message you would like logged.