RealmLog
Global logger class used by all Realm components.
By default all logs will go to a default system logger that will depend on the system. See addDefaultSystemLogger for more details.
Custom loggers can be added by registering a class implementing RealmLogger using add.
When logging messages, it it possible to use a subset of String format options as known from Java. Only %s
, %d
and %f
are supported. See https://stackoverflow.com/a/64499248/1389357 and https://youtrack.jetbrains.com/issue/KT-25506 for more information.
Functions
Add a logger that will be notified on log events that are equal to or exceed the currently configured level.
Adds a default system logger. Where it report log events will depend on the system:
Gets the current log level of a log category.
Removes the given logger if possible.
Removes all loggers, including the default system logger. The default logger can be re-added by calling addDefaultSystemLogger again.
Sets the log level of a log category. By setting the log level of a category all its subcategories would also be updated to match its level.