public class

LoggingCore

extends Object
java.lang.Object
   ↳ com.urbanairship.LoggingCore

Class Overview

Shared logging wrapper for all log entries. This class serves to consolidate the tag and log level in a single location.

Summary

Public Constructors
LoggingCore(int logLevel, String tag)
The logging core constructor.
Public Methods
void addListener(LoggerListener listener)
Adds a listener.
int getLogLevel()
Gets the log level.
void log(int priority, Throwable throwable, String message, Object... args)
Helper method that performs the logging.
void removeListener(LoggerListener listener)
Removes a listener.
void setDefaultLoggerEnabled(boolean enabled)
Sets the enabled default logger flag.
void setLogLevel(int logLevel)
Sets the log level.
void setTag(String tag)
Sets the log tag.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public LoggingCore (int logLevel, String tag)

The logging core constructor.

Parameters
logLevel The loggin level.
tag The log tag.

Public Methods

public void addListener (LoggerListener listener)

Adds a listener. Listener callbacks are synchronized but will be made from the originating thread. Responsibility for any additional threading guarantees falls on the application.

Parameters
listener The listener.

public int getLogLevel ()

Gets the log level.

Returns
  • The log priority level.

public void log (int priority, Throwable throwable, String message, Object... args)

Helper method that performs the logging.

Parameters
priority The log priority level.
throwable The optional exception.
message The optional message.
args The optional message args.

public void removeListener (LoggerListener listener)

Removes a listener.

Parameters
listener The listener.

public void setDefaultLoggerEnabled (boolean enabled)

Sets the enabled default logger flag.

Parameters
enabled The enable default logger flag.

public void setLogLevel (int logLevel)

Sets the log level.

Parameters
logLevel The log priority level.

public void setTag (String tag)

Sets the log tag.

Parameters
tag The log tag.