flutter_blue
flutter_blue copied to clipboard
Standardize logging across entire plugin
Platform code contains logging that should be user-configurable.
Allow the user to change verbosity level for the plugin.
Model after journald:
... takes one of "emerg", "alert", "crit", "err", "warning", "notice", "info", "debug", or integer values in the range of 0–7 (corresponding to the same levels). Messages equal or below the log level specified are stored/forwarded, messages above are dropped.
enum LogLevel {
emergency,
alert,
critical,
error,
warning,
notice,
info,
debug,
}
Allow LogLevel to be set at any time:
FlutterBlue.instance.setLogLevel(LogLevel level);
LogLevel must also be passed to platform side to be used by underlying Android/iOS.
Setting log level with setLogLevel
:
- [x] Dart
- [x] iOS
- [x] Android
Finalize log messages on each platform:
- [ ] Dart
- [ ] iOS
- [ ] Android
Emulate the format of error messages in latest Flutter (1.9)
Log messages need to be changed from NSLog
to log
on iOS.
@pauldemarco Unfortunately this no longer seems to be woorking in 0.7.3
, after setting FlutterBlue.instance.setLogLevel(LogLevel.critical);
still has all the notification debug messages being logged.
Is this still an issue? Log level used to work for me, but I'm now running into the issues @maks mentioned. Any solutions or additions needed to fix this, or has it not been addressed yet?
any news on this? this package is awesome but the amount of logs make it hard to debug