Package com.trimblemaps.mapsdk.log
Class Logger
java.lang.Object
com.trimblemaps.mapsdk.log.Logger
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 ClassesModifier and TypeClassDescriptionstatic @interfaceLog level indicates which logs are allowed to be emitted by the TrimbleMaps Maps SDK for Android. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intPriority constant for the println method; use Logger.d.static final intPriority constant for the println method; use Logger.e.static final intPriority constant for the println method; use Logger.i.static final intPriority constant for the println method.static final intPriority constant for the println method; use Logger.vstatic final intPriority constant for the println method; use Logger.w. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidSend a debug log message.static voidSend a debug log message and log the exception.static voidSend an error log message.static voidSend an error log message and log the exception.static voidSend an info log message.static voidSend an info log message and log the exception.static voidSend a log message based on severity.static voidsetLoggerDefinition(LoggerDefinition loggerDefinition) Replace the current used logger definition.static voidsetVerbosity(int logLevel) Set the verbosity of the Logger.static voidSend a verbose log message.static voidSend a verbose log message and log the exception.static voidSend a warning log message.static voidSend a warning log message and log the exception.
-
Field Details
-
VERBOSE
public static final int VERBOSEPriority constant for the println method; use Logger.vThis log level will print all logs.
- See Also:
-
DEBUG
public static final int DEBUGPriority constant for the println method; use Logger.d.This log level will print all logs except verbose.
- See Also:
-
INFO
public static final int INFOPriority 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 WARNPriority 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 ERRORPriority constant for the println method; use Logger.e.This log level will print only error logs.
- See Also:
-
NONE
public static final int NONEPriority 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
Replace the current used logger definition.- Parameters:
loggerDefinition- the definition of the logger
-
v
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
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
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
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
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
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
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
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
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
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
Send a log message based on severity.- Parameters:
severity- the log severitytag- 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.
-