flutter_log_service 1.0.0 flutter_log_service: ^1.0.0 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 logservice 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 #
logservice: ^1.0.0
How To Use #
Import Package
import 'logservice/logservice.dart';
Initialize LogService Class
LogService logService = LogService();
now call logService.initLogFile() to create file and access it.
logService.initLogFile();
When any error occurs call this
LogStatus status = await widget.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