logger_screen 0.0.3 copy "logger_screen: ^0.0.3" to clipboard
logger_screen: ^0.0.3 copied to clipboard

A Flutter package for displaying Logger logs with a user-friendly UI.

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.

5
likes
140
pub points
66%
popularity

Publisher

verified publisheritisnajim.com

A Flutter package for displaying Logger logs with a user-friendly UI.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, isar, isar_flutter_libs, logger, path_provider

More

Packages that depend on logger_screen