RealmLogger for Android is implemented in native code. This class will be removed in a
future release.public class AndroidLogger extends Object implements Logger
Loglevels are mapped to Realm LogLevels using the following table:
LogLevel.ALL | Log.VERBOSE |
LogLevel.TRACE | Log.VERBOSE |
LogLevel.DEBUG | Log.DEBUG |
LogLevel.INFO | Log.INFO |
LogLevel.WARN | Log.WARN |
LogLevel.ERROR | Log.ERROR |
LogLevel.FATAL | Log.ERROR |
LogLevel.OFF | Not supported. Remove the logger instead. |
| Constructor and Description |
|---|
AndroidLogger(int androidLogLevel)
Deprecated.
Creates an logger that outputs to logcat.
|
| Modifier and Type | Method and Description |
|---|---|
void |
debug(Throwable throwable,
String message,
Object... args)
Deprecated.
Handles a
LogLevel.DEBUG event. |
void |
error(Throwable throwable,
String message,
Object... args)
Deprecated.
Handles an
LogLevel.ERROR event. |
void |
fatal(Throwable throwable,
String message,
Object... args)
Deprecated.
Handles a
LogLevel.FATAL event. |
int |
getMinimumNativeDebugLevel()
Deprecated.
Defines which
LogLevel events this logger cares about from the native components. |
void |
info(Throwable throwable,
String message,
Object... args)
Deprecated.
Handles an
LogLevel.INFO event. |
void |
setTag(String tag)
Deprecated.
Sets the logging tag used when outputting to LogCat.
|
void |
trace(Throwable throwable,
String message,
Object... args)
Deprecated.
Handles a
LogLevel.TRACE event. |
void |
warn(Throwable throwable,
String message,
Object... args)
Deprecated.
Handles a
LogLevel.WARN event. |
public AndroidLogger(int androidLogLevel)
androidLogLevel - Android log levelpublic void setTag(String tag)
tag - Logging tag to use for all subsequent logging calls.public int getMinimumNativeDebugLevel()
LoggerLogLevel events this logger cares about from the native components.
If multiple loggers are registered, the minimum value among all loggers is used.
Note that sending log events from the native layer is relatively expensive, so only set this value to events that are truly useful.
getMinimumNativeDebugLevel in interface LoggerLogLevel native events this logger cares about.public void trace(Throwable throwable, String message, Object... args)
LoggerLogLevel.TRACE event.trace in interface Loggerthrowable - optional exception to log.message - optional additional message.args - optional arguments used to format the message using String.format(String, Object...).public void debug(Throwable throwable, String message, Object... args)
LoggerLogLevel.DEBUG event.debug in interface Loggerthrowable - optional exception to log.message - optional additional message.args - optional arguments used to format the message using String.format(String, Object...).public void info(Throwable throwable, String message, Object... args)
LoggerLogLevel.INFO event.info in interface Loggerthrowable - optional exception to log.message - optional additional message.args - optional arguments used to format the message using String.format(String, Object...).public void warn(Throwable throwable, String message, Object... args)
LoggerLogLevel.WARN event.warn in interface Loggerthrowable - optional exception to log.message - optional additional message.args - optional arguments used to format the message using String.format(String, Object...).public void error(Throwable throwable, String message, Object... args)
LoggerLogLevel.ERROR event.error in interface Loggerthrowable - optional exception to log.message - optional additional message.args - optional arguments used to format the message using String.format(String, Object...).public void fatal(Throwable throwable, String message, Object... args)
LoggerLogLevel.FATAL event.fatal in interface Loggerthrowable - optional exception to log.message - optional additional message.args - optional arguments used to format the message using String.format(String, Object...).