flutter_logs
2.2.8, released 4 weeks ago by umairadil.com
File-based logging framework for Flutter with ELK Stack and MQTT support.
What it does
Flutter Logs provides an advanced file-based logging solution that automatically creates new log files on disk at hourly intervals. It supports log filtering, custom log files, encryption, PII redaction, and optional export to zip files or real-time streaming via MQTT.
AI-written summary of version 2.2.8, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need persistent file-based logging on Android and iOS devices
- You want to sync application logs remotely via ELK stack or MQTT
- You need features like log encryption, retention limits, and automatic error exporting
Skip it when
- You only require basic console print logging during development
- You need complete feature parity on iOS, as some features are still in progress or unsupported
Strengths
- Extensive configuration options for log rotation, retention, and formatting
- Built-in support for ELK stack and MQTT for real-time log streaming
- Includes PII redaction, backpressure, and file encryption
Weaknesses
- iOS feature set is currently more limited than Android
- Requires manual initialization before runApp and platform-specific path handling
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
Call FlutterLogs.initLogs before runApp with required directory structure, timestamp format, and log file extension parameters.
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await FlutterLogs.initLogs(
directoryStructure: DirectoryStructure.FOR_DATE,
timeStampFormat: TimeStampFormat.TIME_FORMAT_READABLE,
logFileExtension: LogFileExtension.LOG,
);
runApp(MyApp());
}Alternatives
Packages that do the same job and could replace flutter_logs.
- logging_appenders
Logging appenders for the dart logging package for print, file, and remote logging.
72Compare - chirp
Lightweight Dart logger with automatic caller info, structured logs, and rotating file writers.
62Compare - f_logs
Advanced logging framework that saves logs to a database and exports them in files or zip archives.
50Compare
Works with
Packages commonly used together with flutter_logs: ones it builds on, ones built on it, and its own family.