Changed in version v2.0.0.
You can set or change your app's log level when developing or debugging your application. You might want to change the log level to log different amounts of data depending on your development needs. You can specify different log levels or custom loggers on a per-isolate basis.
In the Flutter SDK, you can set the level of detail in different parts of your app. To configure the log level, pass a valid LogLevel value to setLogLevel.
Realm.logger.setLogLevel(LogLevel.all, category: LogCategory.realm);
You can change the log level to increase or decrease verbosity at different points in your code. This behavior differs from the deprecated sync client log level, which had to be set before opening a synced realm and could not be changed.
Realm.logger.setLogLevel(LogLevel.off);await executeAppCode();Realm.logger.setLogLevel(LogLevel.debug, category: LogCategory.realm);await executeComplexCodeToDebug();
The Flutter SDK logger conforms to the Dart Logger class.
To get started, set a log level:
Realm.logger.onRecord.listen((record) { print(record.message);});
Define custom logging behavior by listening to Realm.logger.onRecord:
Realm.logger.onRecord.listen((event) { print("Realm log message: '$event'");});
You can turn off logging by passing LogLevel.off
to setLogLevel()
:
Realm.logger.setLogLevel(LogLevel.off);
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4