flutter_log_service 1.0.2 copy "flutter_log_service: ^1.0.2" to clipboard
flutter_log_service: ^1.0.2 copied to clipboard

LogService is a simple Dart-based logging utility that allows you to log messages, errors, and warnings to a text file.

LogService is a simple Dart-based logging utility that allows you to log messages, errors, and warnings to a text file. It also enables users to share the log file for troubleshooting purposes. This library is designed for Flutter apps and works well on Android (will be on iOS soon).

Usage #

To use this package, add flutter_log_service as a dependency in your pubspec.yaml file.

Features #

  • Save Log Error to File
  • Share Log file easily
  • View Saved Logs
  • View Filtered Logs based on Date & Log Level

Getting started #

Follow this steps to use this package

Install #

flutter_log_service: ^1.0.2

How To Use #

Import Package

import 'flutter_log_service/flutter_log_service.dart';

Initialize FlutterLogService Class

FlutterLogService logService = FlutterLogService();

now call logService.initLogFile() to create file and access it.

logService.initLogFile();

When any error occurs call this

LogStatus status = await logService.setLog(
          errorTitle: "Error Title",
          errorMessage: "Error Message",
          level: LogLevel.WARNING);

Get Filtered Logs

LogData data = await logService.getFilteredLogs(
      logLevel: LogLevel.WARNING,
      startDate: DateTime(2023, 8, 1),
      endDate: DateTime.now(),
    );

Share Log File

await logService.shareLog();

Future Updates #

  • Save log file to customized location
  • Set max file size
  • Delete log after specific days limit
  • View Filtered Logs based on Date & Log Level
  • Save customized log (with extra details)

Developer #

Gajendra Somawat

Instagram: gajendra_menaria9

Additional Details #

for more details visit example page or contact on Instagram

1
likes
140
points
52
downloads

Publisher

verified publishernexasync.in

Weekly Downloads

LogService is a simple Dart-based logging utility that allows you to log messages, errors, and warnings to a text file.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, intl, path_provider, share_plus

More

Packages that depend on flutter_log_service