{"id":15684290,"url":"https://github.com/avinashkranjan/logsuite","last_synced_at":"2025-04-30T22:12:08.655Z","repository":{"id":238922426,"uuid":"797983892","full_name":"avinashkranjan/logsuite","owner":"avinashkranjan","description":"Logsuite is a versatile plugin for Flutter apps, seamlessly capturing screenshots, crash logs, and network activity. With automated logging and storage, it ensures comprehensive monitoring and debugging, enhancing app stability and performance.","archived":false,"fork":false,"pushed_at":"2024-07-30T05:41:41.000Z","size":2297,"stargazers_count":7,"open_issues_count":5,"forks_count":15,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-30T22:11:55.134Z","etag":null,"topics":["dart","flutter","gssoc","gssoc24","logging","testing","testing-tools"],"latest_commit_sha":null,"homepage":"http://logsuite.avinashranjan.com","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avinashkranjan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"avinashkranjan","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"custom":null}},"created_at":"2024-05-08T21:32:56.000Z","updated_at":"2025-04-16T16:16:13.000Z","dependencies_parsed_at":"2024-07-20T15:43:07.306Z","dependency_job_id":"063b4dba-058a-4a12-b867-4ec4d8b2b536","html_url":"https://github.com/avinashkranjan/logsuite","commit_stats":{"total_commits":33,"total_committers":10,"mean_commits":3.3,"dds":0.5454545454545454,"last_synced_commit":"7fbe0f24d22c581a4431c191845ba1d21c6bd39e"},"previous_names":["avinashkranjan/logsuite"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avinashkranjan%2Flogsuite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avinashkranjan%2Flogsuite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avinashkranjan%2Flogsuite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avinashkranjan%2Flogsuite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avinashkranjan","download_url":"https://codeload.github.com/avinashkranjan/logsuite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251789618,"owners_count":21644086,"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","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":["dart","flutter","gssoc","gssoc24","logging","testing","testing-tools"],"created_at":"2024-10-03T17:14:09.064Z","updated_at":"2025-04-30T22:12:08.612Z","avatar_url":"https://github.com/avinashkranjan.png","language":"C++","funding_links":["https://github.com/sponsors/avinashkranjan"],"categories":[],"sub_categories":[],"readme":"# LogSuite\n\nLogSuite is a Flutter plugin designed to enhance your debugging and monitoring capabilities by capturing screenshots, recording crash logs, and logging network activity. This plugin helps developers ensure their applications run smoothly and provides detailed logs for troubleshooting. LogSuite follows best architectural practices, focusing on functionality and correctness.\n\n\u003ca href=\"https://pub.dev/packages/logsuite\"\u003e\n   \u003cimg src=\"https://forthebadge.com/images/badges/check-it-out.svg\"\u003e\n\u003c/a\u003e\n\n## Features\n\n1. **Screenshot Capture**:\n   - Automatically captures screenshots every 100ms and saves them to device storage.\n   - Inspired by UxCam/UserExperior for capturing screenshots without explicit permission.\n\n2. **Crash Log Recording**:\n   - Automatically captures and records crash logs with relevant information when a crash occurs.\n   - Saves crash logs to device storage and provides an API for retrieval.\n\n3. **Network Log Capture**:\n   - Intercepts and logs all network requests and responses.\n   - Saves network logs to device storage and exposes an API for retrieval.\n\n4. **Custom Log Capture**:\n   - Allows developers to log custom messages and events for more detailed debugging.\n   - Provides an API for saving and retrieving custom logs.\n\n5. **Performance Monitoring**:\n   - Monitors app performance metrics like CPU and memory usage.\n   - Logs performance data to help identify bottlenecks and optimize the app.\n\n## Architecture\n\nLogSuite follows a modular architecture with a focus on clean code and maintainability. The plugin uses a combination of MVC and BLoC patterns to ensure a clear separation of concerns and to make the codebase easy to navigate and extend.\n\n## Installation\n\nTo use this plugin, add `flutter_log_capture` as a dependency in your `pubspec.yaml` file:\n\n```yaml\ndependencies:\n  flutter:\n    sdk: flutter\n  flutter_log_capture: ^0.1.0\n```\n\n## Usage\n\n### Initializing the Plugin\n\nTo initialize the plugin, call the `initialize` method in your `main` function:\n\n```dart\nimport 'package:flutter/material.dart';\nimport 'package:flutter_log_capture/flutter_log_capture.dart';\n\nvoid main() {\n  FlutterLogCapture.initialize();\n  runApp(MyApp());\n}\n\nclass MyApp extends StatelessWidget {\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      title: 'LogSuite Demo',\n      home: HomePage(),\n    );\n  }\n}\n```\n\n### Sample Application\n\nThe sample application demonstrates the integration and usage of the plugin. It includes functionality for:\n\n- Capturing screenshots manually.\n- Triggering a crash to test crash log recording.\n- Making a network request to test network log capture.\n- Logging custom messages.\n\n```dart\nimport 'package:flutter/material.dart';\nimport 'package:flutter_log_capture/flutter_log_capture.dart';\n\nclass HomePage extends StatelessWidget {\n  @override\n  Widget build(BuildContext context) {\n    return Scaffold(\n      appBar: AppBar(\n        title: Text('LogSuite Demo'),\n      ),\n      body: Center(\n        child: Column(\n          mainAxisAlignment: MainAxisAlignment.center,\n          children: [\n            ElevatedButton(\n              onPressed: () {\n                // Implement screenshot capture functionality\n                FlutterLogCapture.captureScreenshot();\n              },\n              child: Text('Capture Screenshot'),\n            ),\n            ElevatedButton(\n              onPressed: () {\n                // Trigger a crash for demonstration\n                throw Exception('Test crash');\n              },\n              child: Text('Cause Crash'),\n            ),\n            ElevatedButton(\n              onPressed: () {\n                // Make a network request for demonstration\n                FlutterLogCapture.logNetworkRequest(\n                  url: 'https://example.com',\n                  method: 'GET',\n                );\n              },\n              child: Text('Make Network Request'),\n            ),\n            ElevatedButton(\n              onPressed: () {\n                // Log a custom message\n                FlutterLogCapture.logCustomMessage('Custom log message');\n              },\n              child: Text('Log Custom Message'),\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n```\n\n## Capturing Screenshots\n\nTo capture screenshots every 100ms and save them to device storage, ensure the `ScreenshotCapture` class in the plugin is properly initialized and running.\n\n## Recording Crash Logs\n\nCrash logs are automatically captured using the `CrashLogRecorder` class. You can retrieve the crash logs through the provided API.\n\n## Logging Network Activity\n\nThe `NetworkLogCapture` class intercepts and logs network requests and responses. These logs are saved to device storage and can be accessed via the API.\n\n## Custom Log Capture\n\nUse the `CustomLogCapture` class to log custom messages and events. This helps in detailed debugging and tracking specific actions within the app.\n\n## Performance Monitoring\n\nThe `PerformanceMonitor` class logs performance metrics such as CPU and memory usage, providing insights into the app's performance and helping identify optimization areas.\n\n## Contributing\n\nWe welcome contributions! Please see the [CONTRIBUTING.md](https://github.com/avinashkranjan/logsuite/blob/main/CONTRIBUTING.md) file for more details on how to get started.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](https://github.com/avinashkranjan/logsuite/blob/main/LICENSE) file for more details.\n\n## Contact\n\nFor any questions or concerns, please open an issue on GitHub or contact me at `ranjan.avinash@hotmail.com`.\n\nThank you for using LogSuite!\n\n\u003chr\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch2\u003e\u003cimg src=\"https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Smilies/Red%20Heart.png\" width=\"35\" height=\"35\"\u003eOur Contributors\u003c/h2\u003e\n  \u003ch3\u003eThank you for contributing to our repository\u003c/h3\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=avinashkranjan/logsuite\"\u003e\n  \u003ch3\u003eShow some ❤️ by starring this awesome repository!\u003c/h3\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favinashkranjan%2Flogsuite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favinashkranjan%2Flogsuite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favinashkranjan%2Flogsuite/lists"}