{"id":32305435,"url":"https://github.com/lucribas/logcat_monitor","last_synced_at":"2025-10-23T06:51:11.671Z","repository":{"id":64132082,"uuid":"573015772","full_name":"lucribas/logcat_monitor","owner":"lucribas","description":"Logcat monitor plugin to monitor the stream of system messages, stack traces etc using logcat command-line tool.","archived":false,"fork":false,"pushed_at":"2023-02-17T01:36:32.000Z","size":632,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-01T18:40:56.363Z","etag":null,"topics":["android-plugin","dart","flutter","logcat","streaming"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/logcat_monitor","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lucribas.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-12-01T14:17:55.000Z","updated_at":"2024-01-29T13:52:11.000Z","dependencies_parsed_at":"2023-02-14T10:17:10.013Z","dependency_job_id":null,"html_url":"https://github.com/lucribas/logcat_monitor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lucribas/logcat_monitor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucribas%2Flogcat_monitor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucribas%2Flogcat_monitor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucribas%2Flogcat_monitor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucribas%2Flogcat_monitor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucribas","download_url":"https://codeload.github.com/lucribas/logcat_monitor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucribas%2Flogcat_monitor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280577134,"owners_count":26354072,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-23T02:00:06.710Z","response_time":142,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android-plugin","dart","flutter","logcat","streaming"],"created_at":"2025-10-23T06:51:08.271Z","updated_at":"2025-10-23T06:51:11.657Z","avatar_url":"https://github.com/lucribas.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# logcat_monitor\n\nFlutter plugin to monitor the stream of system messages, stack traces etc using *logcat* command-line tool.\n\nNOTE: This plugin fetches logs only on Android Devices presently.\n\n# how to use\n\n1. Create a function to consume the *logcat* messages\n```dart\n  void _mylistenStream(dynamic value) {\n    if (value is String) {\n      _logBuffer.writeln(value);\n    }\n  }\n```\n\n2. Register your function as a listener to get logs then use it in anyway within your app.\n```dart\n    LogcatMonitor.addListen(_mylistenStream);\n```\n\n3. Start the logcat monitor passing the [filter parameters](#logcat_filter) as defined in *logcat* tool.\n```dart\n    await LogcatMonitor.startMonitor(\"*.*\");\n```\n\n## Installation\n\nNeed permission in AndroidManifest.xml:\n```xml\n\u003cuses-permission android:name=\"android.permission.READ_LOGS\" /\u003e\n```\n\n[https://pub.dev/packages/logcat_monitor/install](https://pub.dev/packages/logcat_monitor/install)\n\n# example\n\nFollows a screenshot of example code in [example](https://github.com/lucribas/logcat_monitor/tree/main/example) folder.\n\nHere we use a StringBuffer to store the messages and display them in the log screen.\n\n\u003cp align='center'\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/lucribas/logcat_monitor/main/doc/example1.jpg\" /\u003e\n\u003c/p\u003e\n\n# under the hood\n\nThe LogcatMonitorPlugin runs event/method channel handlers in **UI-thread** and the *logcat* process monitor in a **background thread** as recomended by Google to not block the UI interface.\n\n\u003cp align='center'\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/lucribas/logcat_monitor/main/doc/diagram.png\" /\u003e\n\u003c/p\u003e\n\n\n### logcat filter options\n\n\u003ca name=\"logcat_filter\"\u003e\u003c/a\u003e\n\nfrom `logcat -h`:\n```txt\nfilterspecs are a series of \n  \u003ctag\u003e[:priority]\n\nwhere \u003ctag\u003e is a log component tag (or * for all) and priority is:\n  V    Verbose (default for \u003ctag\u003e)\n  D    Debug (default for '*')\n  I    Info\n  W    Warn\n  E    Error\n  F    Fatal\n  S    Silent (suppress all output)\n\n'*' by itself means '*:D' and \u003ctag\u003e by itself means \u003ctag\u003e:V.\nIf no '*' filterspec or -s on command line, all filter defaults to '*:V'.\neg: '*:S \u003ctag\u003e' prints only \u003ctag\u003e, '\u003ctag\u003e:S' suppresses all \u003ctag\u003e log messages.\n```\n\nExamples:\n - `*.*` show ALL tags and priorities.\n - `flutter,LogcatMonPlugin,S:*` show flutter and LogcatMonPlugin and suppresses all others.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucribas%2Flogcat_monitor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucribas%2Flogcat_monitor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucribas%2Flogcat_monitor/lists"}