Git Product home page Git Product logo

flutter_logger_screen's Introduction

Logger Screen

Pub Version License

Logger Screen is a Flutter package that provides a user-friendly UI for displaying logs with filtering and searching capabilities. It's designed to work seamlessly with the popular Logger package.

preview

Installation

Run the following command in your flutter project:

flutter pub add logger_screen

Usage

  1. Import the package:
import 'package:logger_screen/logger_screen.dart';
  1. Create an instance of LoggerScreenPrinter:
LoggerScreenPrinter myLoggerPrinter = LoggerScreenPrinter(
  fileName: "logs",
  encryptionKey: "my_secret_key",
  printEmojis: true,
);
  1. Create a LoggerScreen widget using the created printer:
LoggerScreen(
  printer: myLoggerPrinter,
  itemBuilder: (context, log, index) {
    // Customize the appearance of individual log items here
    return MyCustomLogItem(log: log);
  },
  numberOfColumns: 2, // Specify the number of columns in grid layout
  style: Style.platform, // Choose between Style.material, Style.cupertino, or Style.platform
  title: "My Logs", // Set the title of the screen
  trailingActions: [
    IconButton(
      icon: Icon(Icons.clear_all),
      onPressed: () {
        // Clear logs action
        myLoggerPrinter.clear();
      },
    ),
  ],
)
  1. Start write the logs:
  final logger = Logger(printer: myLoggerPrinter);
  logger.t("Trace log message");
  logger.d("Debug log message");
  logger.i("Info log message");
  logger.w("Warning log message");
  logger.e("Error log message");

Features

  • Display logs with customizable appearance.
  • Filter and search logs based on levels and content.
  • Clear logs action.
  • Customizable log item appearance.
  • Support for both single-column and grid layouts.
  • Available in Material Design, Cupertino, and platform-specific styles.

Contribution

Contributions to this package are welcome! If you find any issues or have suggestions, feel free to open an issue or submit a pull request on GitHub.

License

logger_screen is available under the MIT license. See the LICENSE file for more info.

flutter_logger_screen's People

Contributors

itisnajim avatar vannt1991 avatar

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.