Docs 菜单
Docs 主页
/ /
io.realm.log

类 RealmLog

java.lang.Object
io.realm.log.RealmLog

所有 Realm 组件使用的全局记录器。 可以通过注册实现RealmLogger的类来添加自定义记录器。

构造函数和描述
修饰符和类型
方法和说明

public static void

add (
)

添加将在发生日志事件时收到通知的记录器实现。

public static void

删除所有记录器。

public static void

Throwable throwable,
String message,
)

记录LogLevel.DEBUG事件。

public static void

记录LogLevel.DEBUG事件。

public static void

Throwable throwable
)

记录LogLevel.DEBUG异常。

public static void

Throwable throwable,
String message,
)

记录LogLevel.ERROR事件。

public static void

记录LogLevel.ERROR事件。

public static void

Throwable throwable
)

记录LogLevel.ERROR异常。

public static void

Throwable throwable,
String message,
)

记录LogLevel.FATAL事件。

public static void

记录LogLevel.FATAL事件。

public static void

Throwable throwable
)

记录LogLevel.FATAL异常。

public static int

获取当前LogLevel

public static void

Throwable throwable,
String message,
)

记录LogLevel.INFO事件。

public static void

记录LogLevel.INFO事件。

public static void

Throwable throwable
)

记录LogLevel.INFO异常。

public static void

添加默认的本机记录器(如果之前已删除)。

public static boolean

删除给定的记录器(如果当前已添加)。

public static void

int level
)

设置当前LogLevel

public static void

Throwable throwable,
String message,
)

记录LogLevel.TRACE事件。

public static void

记录LogLevel.TRACE事件。

public static void

Throwable throwable
)

记录LogLevel.TRACE异常。

public static void

Throwable throwable,
String message,
)

记录LogLevel.WARN事件。

public static void

记录LogLevel.WARN事件。

public static void

Throwable throwable
)

记录LogLevel.WARN异常。

  • 从类 java.lang.Object 继承的方法:getClasshashCodeequalsclonetoStringnotifynotifyAllwaitwaitwait ,finalize

public RealmLog ()

public static void add (
)

添加将在发生日志事件时收到通知的记录器实现。

参数

public static void debug (
Throwable throwable,
String message,
)

记录LogLevel.DEBUG事件。

参数

public static void debug (
)

记录LogLevel.DEBUG事件。

参数

public static void debug (
Throwable throwable
)

记录LogLevel.DEBUG异常。

参数

  • throwable — 要记录的异常。

public static void error (
Throwable throwable,
String message,
)

记录LogLevel.ERROR事件。

参数

public static void error (
)

记录LogLevel.ERROR事件。

参数

public static void error (
Throwable throwable
)

记录LogLevel.ERROR异常。

参数

  • throwable — 要记录的异常。

public static void fatal (
Throwable throwable,
String message,
)

记录LogLevel.FATAL事件。

参数

public static void fatal (
)

记录LogLevel.FATAL事件。

参数

public static void fatal (
Throwable throwable
)

记录LogLevel.FATAL异常。

参数

  • throwable — 要记录的异常。

public static int getLevel ()

获取当前LogLevel

返回:

当前LogLevel

public static void info (
Throwable throwable,
String message,
)

记录LogLevel.INFO事件。

参数

public static void info (
)

记录LogLevel.INFO事件。

参数

public static void info (
Throwable throwable
)

记录LogLevel.INFO异常。

参数

  • throwable — 要记录的异常。

public static void registerDefaultLogger ()

添加默认的本机记录器(如果之前已删除)。 如果默认记录器已经注册,则不会再次添加。 Android 上的默认记录器将记录到 logcat。

public static boolean remove (
)

删除给定的记录器(如果当前已添加)。

返回:

true 如果记录器已删除,则为false

public static void setLevel (
int level
)

设置当前LogLevel 。 设置此项将影响所有已注册的记录器。

参数

public static void trace (
Throwable throwable,
String message,
)

记录LogLevel.TRACE事件。

参数

public static void trace (
)

记录LogLevel.TRACE事件。

参数

public static void trace (
Throwable throwable
)

记录LogLevel.TRACE异常。

参数

  • throwable — 要记录的异常。

public static void warn (
Throwable throwable,
String message,
)

记录LogLevel.WARN事件。

参数

public static void warn (
)

记录LogLevel.WARN事件。

参数

public static void warn (
Throwable throwable
)

记录LogLevel.WARN异常。

参数

  • throwable — 要记录的异常。

后退

日志级别

在此页面上