RealmLogger class

A logger that logs messages from the Realm SDK.

To subscribe to log messages, use onRecord.

Example:

hierarchyLoggingEnabled = true;
final logSubscription = Realm.logger.onRecord.listen((record) {
  Logger(record.category.toString()).log(record.level.level, record.message);
  // or just print(record);
});
...
logSubscription.cancel(); // when done

If no listeners are attached to onRecord in any isolate, the trace will go to stdout.

Constructors

RealmLogger()
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
onRecord → Stream<LogRecord>
The stream of log records.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setLogLevel(LogLevel level, {LogCategory? category}) → void
Set the log level for the given category.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited