flutter_native_log_handler 0.1.2 copy "flutter_native_log_handler: ^0.1.2" to clipboard
flutter_native_log_handler: ^0.1.2 copied to clipboard

Listen to native Android and iOS logs (basically listen to stdout/stderr).

flutter_native_log_handler #

Listen to Android and iOS logs.

https://pub.dev/packages/flutter_native_log_handler

Motivation #

We had the case where we want to send all app logs to a logging backend. You can easily capture Flutter logs with Dart's zones feature. But what about Android's Logcat logs from native plugins and Android itself? Or iOS native logs? This package gives you the ability to listen to those logs messages and handle them as you like (I wouldn't print them, because infinite loops are usually a bad thing 😉).

Installation #

As simple as dart pub add flutter_native_log_handler.

Or manually add flutter_native_log_handler: ^0.1.2 to your pubspec.yaml.

Usage #

StreamSubscription<NativeLogMessage> subscription =
    FlutterNativeLogs().logStream.listen(
        (NativeLogMessage message) =>
            doSomethingWithLogMessage(message),
        );
3
likes
120
pub points
49%
popularity

Publisher

verified publishergoddchen.de

Listen to native Android and iOS logs (basically listen to stdout/stderr).

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

dartz, flutter, freezed_annotation, plugin_platform_interface

More

Packages that depend on flutter_native_log_handler