Giter Site home page Giter Site logo

avinashkranjan / logsuite Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 16.0 2.24 MB

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.

Home Page: http://logsuite.avinashranjan.com

License: MIT License

Dart 22.26% Kotlin 0.18% Swift 2.81% Objective-C 0.06% CMake 29.45% C++ 36.04% C 2.16% HTML 2.79% Ruby 4.25%
dart flutter logging testing testing-tools gssoc gssoc24

logsuite's Introduction

LogSuite

LogSuite 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.

Features

  1. Screenshot Capture:

    • Automatically captures screenshots every 100ms and saves them to device storage.
    • Inspired by UxCam/UserExperior for capturing screenshots without explicit permission.
  2. Crash Log Recording:

    • Automatically captures and records crash logs with relevant information when a crash occurs.
    • Saves crash logs to device storage and provides an API for retrieval.
  3. Network Log Capture:

    • Intercepts and logs all network requests and responses.
    • Saves network logs to device storage and exposes an API for retrieval.
  4. Custom Log Capture:

    • Allows developers to log custom messages and events for more detailed debugging.
    • Provides an API for saving and retrieving custom logs.
  5. Performance Monitoring:

    • Monitors app performance metrics like CPU and memory usage.
    • Logs performance data to help identify bottlenecks and optimize the app.

Architecture

LogSuite 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.

Installation

To use this plugin, add flutter_log_capture as a dependency in your pubspec.yaml file:

dependencies:
  flutter:
    sdk: flutter
  flutter_log_capture: ^0.1.0

Usage

Initializing the Plugin

To initialize the plugin, call the initialize method in your main function:

import 'package:flutter/material.dart';
import 'package:flutter_log_capture/flutter_log_capture.dart';

void main() {
  FlutterLogCapture.initialize();
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'LogSuite Demo',
      home: HomePage(),
    );
  }
}

Sample Application

The sample application demonstrates the integration and usage of the plugin. It includes functionality for:

  • Capturing screenshots manually.
  • Triggering a crash to test crash log recording.
  • Making a network request to test network log capture.
  • Logging custom messages.
import 'package:flutter/material.dart';
import 'package:flutter_log_capture/flutter_log_capture.dart';

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('LogSuite Demo'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            ElevatedButton(
              onPressed: () {
                // Implement screenshot capture functionality
                FlutterLogCapture.captureScreenshot();
              },
              child: Text('Capture Screenshot'),
            ),
            ElevatedButton(
              onPressed: () {
                // Trigger a crash for demonstration
                throw Exception('Test crash');
              },
              child: Text('Cause Crash'),
            ),
            ElevatedButton(
              onPressed: () {
                // Make a network request for demonstration
                FlutterLogCapture.logNetworkRequest(
                  url: 'https://example.com',
                  method: 'GET',
                );
              },
              child: Text('Make Network Request'),
            ),
            ElevatedButton(
              onPressed: () {
                // Log a custom message
                FlutterLogCapture.logCustomMessage('Custom log message');
              },
              child: Text('Log Custom Message'),
            ),
          ],
        ),
      ),
    );
  }
}

Capturing Screenshots

To capture screenshots every 100ms and save them to device storage, ensure the ScreenshotCapture class in the plugin is properly initialized and running.

Recording Crash Logs

Crash logs are automatically captured using the CrashLogRecorder class. You can retrieve the crash logs through the provided API.

Logging Network Activity

The NetworkLogCapture class intercepts and logs network requests and responses. These logs are saved to device storage and can be accessed via the API.

Custom Log Capture

Use the CustomLogCapture class to log custom messages and events. This helps in detailed debugging and tracking specific actions within the app.

Performance Monitoring

The PerformanceMonitor class logs performance metrics such as CPU and memory usage, providing insights into the app's performance and helping identify optimization areas.

Contributing

We welcome contributions! Please see the CONTRIBUTING.md file for more details on how to get started.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Contact

For any questions or concerns, please open an issue on GitHub or contact me at [email protected].

Thank you for using LogSuite!


Our Contributors

Thank you for contributing to our repository

Show some ❤️ by starring this awesome repository!

logsuite's People

Contributors

avinashkranjan avatar debangi29 avatar imgbotapp avatar mdazfar2 avatar mukund-gpt avatar piyushsahujtp avatar pradnyagaitonde avatar saumya-28 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

logsuite's Issues

Make Scrollbar stylish

Is your feature request related to a problem? Please describe.
I will add stylish scrollbar in this website.

Describe the solution you'd like
image

Describe alternatives you've considered
NA

Additional context
NA

Automatically Comment on Issue Raise

Is your feature request related to a problem? Please describe.
Contributors often lack immediate acknowledgment when they raise an issue in the project repository. This absence of feedback can lead to uncertainty and discouragement among contributors.

Describe the solution you'd like
I propose implementing a feature that automatically comments on an issue when it is raised. This comment will serve as an acknowledgment to the contributor for bringing the issue to our attention and provide any necessary guidance or next steps.

Describe alternatives you've considered
One alternative is to rely on manual acknowledgment by project maintainers, but this can be time-consuming and may lead to delays in providing feedback to contributors. Another option is to use issue templates with predefined acknowledgment messages, but this still requires manual intervention to add the comment.

Additional context
Automating the comment process upon issue raise would enhance the contributor experience by providing immediate feedback and guidance, ultimately fostering a more positive and efficient collaboration environment.

Back To Top scroll button

Is your feature request related to a problem? Please describe.
scroll to the top
Describe the solution you'd like
avoid scrolling
Describe alternatives you've considered
better user engagement
Additional context
Add any other context or screenshots about the feature request here.

Add New Template for Documentation in Issues Template

Description:

I propose adding a new template specifically for documentation-related issues to the Issues Template of the logsuite repository. This will help streamline and standardize the process of reporting and addressing documentation needs.

Screnshots

New feature screenshot


Here are the above this is just a screenshot while raising new new issues

  • & When users click on Get Started it is showing option like the below screenshot-

image

@avinashkranjan Looking forward to your feedback and the opportunity to contribute to this enhancement.

Add GitHub Desktop Contribution Instructions

I am interested in contributing to the project by adding detailed instructions on how to contribute using GitHub Desktop.

I believe that by providing clear and comprehensive guidance, we can encourage more contributors to participate in the project, especially those who prefer using GitHub Desktop for their contributions.

Could you please assign me the issue related to adding GitHub Desktop contribution instructions under gssoc24? I am excited about the opportunity to contribute to the project and help streamline the contribution process for others.

Auto commit for closed issues

Description:

I propose adding a workflow file to the repository that automatically commits changes when a new issue is opened. This automation will streamline the development process and ensure timely updates.

Issue Details:

  • 📝 Manual Commits: Currently, commits must be made manually when an issue is close, which can be time-consuming and prone to delays.
  • ⚙️ Automation: Implementing an automated workflow will enhance efficiency and consistency.

Screenshots-

image

Benefits:

  • ⏱️ Time-Saving: Automates repetitive tasks, saving valuable time for contributors and maintainers.
  • 🔄 Consistency: Ensures that all issues are promptly followed by the necessary commits, maintaining a consistent update process.
  • 📈 Improved Workflow: Enhances the overall workflow by reducing manual steps and potential human errors.

@avinashkranjan It is essential to close the issues, and you don't have to comment to the user that their issues have been closed. Please assign this issue to me.

Crash Log Recording

Objective

Automatically capture and record crash logs with relevant information when a crash occurs. Save crash logs to device storage and provide an API for retrieval.

Requirements

  • Automatically capture crash logs with relevant information.
  • Save the crash logs to device storage.
  • Provide an API to retrieve the crash logs.

Steps to Implement

  1. Create a CrashLogRecorder class.
  2. Use a package like catcher to automatically capture crash logs.
  3. Save the captured logs to a predefined directory on the device.
  4. Implement an API to retrieve the crash logs.

Resources

Catcher package
Device Info Plus package

Export Logs to Different Formats:

Is your feature request related to a problem? Please describe.
It is usually frustrating to manually copy logs and convert to different formats for analysis or sharing, which is time-consuming and prone to errors. Having an integrated export feature for logs in various formats like JSON, CSV, and plain text would greatly enhance usability and streamline the process for developers.

Describe the solution you'd like
I would like LogSuite to include an option to export logs directly from the application in various formats, such as JSON, CSV, and plain text. This feature should allow developers to select the desired format and easily save the logs to a file, making it more convenient to share and analyze logs without manual conversion.

Describe alternatives you've considered
Using third-party logging libraries that already support multiple export formats, but this would require integrating and managing additional dependencies, potentially complicating the project.

Additional context
I'm a GSSoC'24 contributor and I want to work on this. So can you please assign it to me @avinashkranjan

Add a Login Page

Is your feature request related to a problem? Please describe.
@avinashkranjan I want to add a Login/Signup Page to the website.Kindly assign this issue to me.

Describe the solution you'd like
NA

Describe alternatives you've considered
NA

Additional context
NA

Automatic copyright.

The code contains manual copyright which needs to be changed every year manually.
I can add a automatic copyright code which reduces manual effort to update every year.

image

[Feature Request]: Integrating Docker into the project

Docker is a must for open-source projects nowadays as it has its benefits.

Use Case
Dockerfile has many benefits but consistency and isolation stand out the most.

Docker allows you to package your entire application, including its dependencies, into a single container. That makes sure your application will run across different environments.
another benefit is that it runs in its environment without interfering with other applications or the host system.

I will also be updating the docs for it.

🔄 Add Workflow File for Auto-Commit on Open Issues

Description:

I propose adding a workflow file to the repository that automatically commits changes when a new issue is opened. This automation will streamline the development process and ensure timely updates.

Issue Details:

  • 📝 Manual Commits: Currently, commits must be made manually when an issue is opened, which can be time-consuming and prone to delays.
  • ⚙️ Automation: Implementing an automated workflow will enhance efficiency and consistency.

Screenshots-

image

Benefits:

  • ⏱️ Time-Saving: Automates repetitive tasks, saving valuable time for contributors and maintainers.
  • 🔄 Consistency: Ensures that all issues are promptly followed by the necessary commits, maintaining a consistent update process.
  • 📈 Improved Workflow: Enhances the overall workflow by reducing manual steps and potential human errors.

@avinashkranjan please assign this issues to me

Creating a PR Template

Creating a PR Template for streamlined and easy contributions for both the developer and the maintainer.

Sample Application

Objective

Develop a sample Flutter application that demonstrates the integration and usage of the plugin. The sample application should showcase the plugin's functionality, including screenshot capture, crash log recording, and network log capture. Provide clear instructions on how to run the sample application and observe the plugin's behavior.

Requirements

  • Develop a sample Flutter application.
  • Integrate the flutter_log_capture plugin.
  • Demonstrate screenshot capture functionality.
  • Demonstrate crash log recording functionality.
  • Demonstrate network log capture functionality.
  • Provide clear instructions on how to run the sample application.
  • Steps to Implement

Create a new Flutter application.

  1. Add the flutter_log_capture plugin as a dependency.
  2. Implement the UI to demonstrate screenshot capture.
  3. Implement the UI to demonstrate crash log recording.
  4. Implement the UI to demonstrate network log capture.
  5. Write instructions on how to run the sample application.

Feat: Add Dependabot for flutter dependency Updates

Describe the feature

I propose integrating Dependabot into our project to automate dependency updates. Dependabot will regularly check for updates, ensuring we stay current with the latest features and security patches. This will save time, enhance security, and maintain consistency in our development process.

I'm a GSSoC'24 contributor
I want to work on this issue

Screenshot Capture

Objective

Capture screenshots every 100ms and save them to device storage without taking permission. Reference UxCam/UserExperior for implementation.

Requirements

  • Implement a mechanism to capture screenshots every 100ms.
  • Save the captured screenshots to device storage.
  • Ensure the process does not require explicit permission from the user.

Steps to Implement

  1. Create a ScreenshotCapture class.
  2. Use a timer to trigger screenshot capture every 100ms.
  3. Save the screenshots to a predefined directory on the device.
  4. Ensure the functionality works on both Android and iOS.

Resources

Screenshot package

DOC: README File Modification for Better Attractiveness and Understandability

What's wrong with the existing documentation

The current README file for the project requires modifications to make it more attractive and easier to understand. The aim is to ensure that new users can quickly grasp the purpose of the project, how to set it up, and how to contribute. Below are the specific improvements needed.

Add Screenshots

Screenshot 2024-06-25 135713

Expected Outcome:
A well-structured, visually appealing, and informative README file that enhances user engagement and facilitates easier understanding of the project.

Record

  • I agree to follow this project's Code of Conduct
  • I'm a GirlScript Summer of Code 2024 contributor
  • I want to work on this issue

Network Log Capture

Objective

Intercept and log all network requests and responses. Save network logs to device storage and expose an API for retrieval.

Requirements

  • Intercept all network requests and responses.
  • Log the intercepted data.
  • Save the logs to device storage.
  • Provide an API to retrieve the network logs.

Steps to Implement

  1. Create a NetworkLogCapture class.
  2. Use a package like http or dio to intercept network requests and responses.
  3. Log the intercepted data.
  4. Save the logs to a predefined directory on the device.
  5. Implement an API to retrieve the network logs.

Resources

Http package
Dio package

Design a UI for logsuite

When a user enters into logsuite they concentrate on UI, there have simple look for UI so they cant understand a concept

A clear and understand UI is made to improving a project

I do an alternative design for logsuite which attracts more

Please assign this to me , I do my best in UI
Here my portfolio: https://www.behance.net/shalinimariapp
I want to contribute in this project

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.