Package com.mapbox.mapboxsdk.log

Contains the Mapbox Maps Android Log API classes.

Types

Name Summary
Logger
class Logger
Logger for the Mapbox Maps SDK for Android Default implementation relies on Log.
LoggerDefinition
interface LoggerDefinition
Definition of a logger for the Mapbox Maps SDK for Android.

Logger

class Logger

Logger for the Mapbox Maps SDK for Android

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

Types

Name Summary
LogLevel
@Retention(value = RetentionPolicy.SOURCE)
annotation class LogLevel
Log level indicates which logs are allowed to be emitted by the Mapbox Maps SDK for Android.

Functions

Name Summary
d
open fun d(tag: String, msg: String)
Send a debug log message.
open fun d(tag: String, msg: String, tr: Throwable)
Send a debug log message and log the exception.
e
open fun e(tag: String, msg: String)
Send an error log message.
open fun e(tag: String, msg: String, tr: Throwable)
Send an error log message and log the exception.
i
open fun i(tag: String, msg: String)
Send an info log message.
open fun i(tag: String, msg: String, tr: Throwable)
Send an info log message and log the exception.
log
open fun log(severity: Int, tag: String, message: String)
Send a log message based on severity.
setLoggerDefinition
open fun setLoggerDefinition(loggerDefinition: LoggerDefinition)
Replace the current used logger definition.
setVerbosity
open fun setVerbosity(logLevel: Int)
Set the verbosity of the Logger.
v
open fun v(tag: String, msg: String)
Send a verbose log message.
open fun v(tag: String, msg: String, tr: Throwable)
Send a verbose log message and log the exception.
w
open fun w(tag: String, msg: String)
Send a warning log message.
open fun w(tag: String, msg: String, tr: Throwable)
Send a warning log message and log the exception.

Properties

Name Summary
DEBUG val DEBUG: IntPriority constant for the println method; use Logger.d.
ERROR val ERROR: IntPriority constant for the println method; use Logger.e.
INFO val INFO: IntPriority constant for the println method; use Logger.i.
NONE val NONE: IntPriority constant for the println method.
VERBOSE val VERBOSE: IntPriority constant for the println method; use Logger.
WARN val WARN: IntPriority constant for the println method; use Logger.w.

DEBUG

val DEBUG: Int

Priority constant for the println method; use Logger.d.

This log level will print all logs except verbose.

ERROR

val ERROR: Int

Priority constant for the println method; use Logger.e.

This log level will print only error logs.

INFO

val INFO: Int

Priority constant for the println method; use Logger.i.

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

NONE

val NONE: Int

Priority constant for the println method.

This log level won’t print any logs.

VERBOSE

val VERBOSE: Int

Priority constant for the println method; use Logger.v

This log level will print all logs.

WARN

val WARN: Int

Priority constant for the println method; use Logger.w.

This log level will print only warn and error logs.

d

open fun d(tag: String, msg: String)

Send a debug log message.

Parameters
Name Summary
tag
Used to identify the source of a log message. It usually identifiesthe class or activity where the log call occurs.
msg
The message you would like logged.
   
   

open fun d(tag: String, msg: String, tr: Throwable)

Send a debug log message and log the exception.

Parameters
Name Summary
tag
Used to identify the source of a log message. It usually identifiesthe class or activity where the log call occurs.
msg
The message you would like logged.
tr
An exception to log
   
   

e

open fun e(tag: String, msg: String)

Send an error log message.

Parameters
Name Summary
tag
Used to identify the source of a log message. It usually identifiesthe class or activity where the log call occurs.
msg
The message you would like logged.
   
   

open fun e(tag: String, msg: String, tr: Throwable)

Send an error log message and log the exception.

Parameters
Name Summary
tag
Used to identify the source of a log message. It usually identifiesthe class or activity where the log call occurs.
msg
The message you would like logged.
tr
An exception to log
   
   

i

open fun i(tag: String, msg: String)

Send an info log message.

Parameters
Name Summary
tag
Used to identify the source of a log message. It usually identifiesthe class or activity where the log call occurs.
msg
The message you would like logged.
   
   

open fun i(tag: String, msg: String, tr: Throwable)

Send an info log message and log the exception.

Parameters
Name Summary
tag
Used to identify the source of a log message. It usually identifiesthe class or activity where the log call occurs.
msg
The message you would like logged.
tr
An exception to log
   
   

log

open fun log(severity: Int, tag: String, message: String)

Send a log message based on severity.

Parameters
Name Summary
severity
the log severity
tag
Used to identify the source of a log message. It usually identifiesthe class or activity where the log call occurs.
message
The message you would like logged.
   
   

setLoggerDefinition

open fun setLoggerDefinition(loggerDefinition: LoggerDefinition)

Replace the current used logger definition.

Parameters
Name Summary
loggerDefinition
the definition of the logger
   
   

setVerbosity

open fun setVerbosity(logLevel: Int)

Set the verbosity of the Logger.

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

Parameters
Name Summary
logLevel
the verbosity level
   
   

v

open fun v(tag: String, msg: String)

Send a verbose log message.

Parameters
Name Summary
tag
Used to identify the source of a log message. It usually identifiesthe class or activity where the log call occurs.
msg
The message you would like logged.
   
   

open fun v(tag: String, msg: String, tr: Throwable)

Send a verbose log message and log the exception.

Parameters
Name Summary
tag
Used to identify the source of a log message. It usually identifiesthe class or activity where the log call occurs.
msg
The message you would like logged.
tr
An exception to log
   
   

w

open fun w(tag: String, msg: String)

Send a warning log message.

Parameters
Name Summary
tag
Used to identify the source of a log message. It usually identifiesthe class or activity where the log call occurs.
msg
The message you would like logged.
   
   

open fun w(tag: String, msg: String, tr: Throwable)

Send a warning log message and log the exception.

Parameters
Name Summary
tag
Used to identify the source of a log message. It usually identifiesthe class or activity where the log call occurs.
msg
The message you would like logged.
tr
An exception to log
   
   

LogLevel

@Retention(value = RetentionPolicy.SOURCE)

annotation class LogLevel

Log level indicates which logs are allowed to be emitted by the Mapbox Maps SDK for Android.

Functions

Name Summary
annotationType
abstract fun annotationType(): Class
equals
abstract fun equals(p: Any): Boolean
hashCode
abstract fun hashCode(): Int
toString
abstract fun toString(): String

LoggerDefinition

interface LoggerDefinition

Definition of a logger for the Mapbox Maps SDK for Android.

Functions

Name Summary
d
abstract fun d(tag: String, msg: String)
Send a debug log message.
abstract fun d(tag: String, msg: String, tr: Throwable)
Send a debug log message and log the exception.
e
abstract fun e(tag: String, msg: String)
Send an error log message.
abstract fun e(tag: String, msg: String, tr: Throwable)
Send an error log message and log the exception.
i
abstract fun i(tag: String, msg: String)
Send an info log message.
abstract fun i(tag: String, msg: String, tr: Throwable)
Send an info log message and log the exception.
v
abstract fun v(tag: String, msg: String)
Send a verbose log message.
abstract fun v(tag: String, msg: String, tr: Throwable)
Send a verbose log message and log the exception.
w
abstract fun w(tag: String, msg: String)
Send a warning log message.
abstract fun w(tag: String, msg: String, tr: Throwable)
Send a warning log message and log the exception.

d

abstract fun d(tag: String, msg: String)

Send a debug log message.

Parameters
Name Summary
tag
Used to identify the source of a log message. It usually identifiesthe class or activity where the log call occurs.
msg
The message you would like logged.
   
   

abstract fun d(tag: String, msg: String, tr: Throwable)

Send a debug log message and log the exception.

Parameters
Name Summary
tag
Used to identify the source of a log message. It usually identifiesthe class or activity where the log call occurs.
msg
The message you would like logged.
tr
An exception to log
   
   

e

abstract fun e(tag: String, msg: String)

Send an error log message.

Parameters
Name Summary
tag
Used to identify the source of a log message. It usually identifiesthe class or activity where the log call occurs.
msg
The message you would like logged.
   
   

abstract fun e(tag: String, msg: String, tr: Throwable)

Send an error log message and log the exception.

Parameters
Name Summary
tag
Used to identify the source of a log message. It usually identifiesthe class or activity where the log call occurs.
msg
The message you would like logged.
tr
An exception to log
   
   

i

abstract fun i(tag: String, msg: String)

Send an info log message.

Parameters
Name Summary
tag
Used to identify the source of a log message. It usually identifiesthe class or activity where the log call occurs.
msg
The message you would like logged.
   
   

abstract fun i(tag: String, msg: String, tr: Throwable)

Send an info log message and log the exception.

Parameters
Name Summary
tag
Used to identify the source of a log message. It usually identifiesthe class or activity where the log call occurs.
msg
The message you would like logged.
tr
An exception to log
   
   

v

abstract fun v(tag: String, msg: String)

Send a verbose log message.

Parameters
Name Summary
tag
Used to identify the source of a log message. It usually identifiesthe class or activity where the log call occurs.
msg
The message you would like logged.
   
   

abstract fun v(tag: String, msg: String, tr: Throwable)

Send a verbose log message and log the exception.

Parameters
Name Summary
tag
Used to identify the source of a log message. It usually identifiesthe class or activity where the log call occurs.
msg
The message you would like logged.
tr
An exception to log
   
   

w

abstract fun w(tag: String, msg: String)

Send a warning log message.

Parameters
Name Summary
tag
Used to identify the source of a log message. It usually identifiesthe class or activity where the log call occurs.
msg
The message you would like logged.
   
   

abstract fun w(tag: String, msg: String, tr: Throwable)

Send a warning log message and log the exception.

Parameters
Name Summary
tag
Used to identify the source of a log message. It usually identifiesthe class or activity where the log call occurs.
msg
The message you would like logged.
tr
An exception to log