Skip to content

jayantahexagon/flutter_native_logs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.1 to your pubspec.yaml.

Usage

StreamSubscription<NativeLogMessage> subscription =
    FlutterNativeLogs().logStream.listen(
        (NativeLogMessage message) =>
            doSomethingWithLogMessage(message),
        );

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 83.6%
  • Swift 5.7%
  • Kotlin 5.3%
  • Ruby 4.0%
  • Objective-C 1.4%