flutter_logging_service 0.2.0
flutter_logging_service: ^0.2.0 copied to clipboard
A comprehensive logging service for Flutter apps with file persistence, log aggregation, crash tracking, sessions, masking, and isolate-backed writes.
Changelog #
All notable changes to this project will be documented in this file.
0.2.0 - 2026-08-06 #
Added #
- LogFileStore abstraction with queued IO, memory/stub (web), and isolate-backed writers
- Sessions via
startSession()/sessionStartExtra(file lines keep[LEVEL]markers;sid=suffix) - Masking with
MaskingRule,addMaskingRule(s), and opt-inenableDefaultMasking - Real-time stream:
LoggingService.streamofLogRecord(post-mask, pre-aggregation) - In-memory ring buffer (
bufferLimit, default 2000) for web / live viewer fallback - Zip export (
exportLogsZip), searchLogs, and reusable LogViewer widget - Retention:
logsRetentionconfig +clearLogsBefore(Duration) - Lifecycle:
flush(),dispose(),setMinLogLevel(), re-initafter dispose - Backpressure:
writeQueueCapacityand optional per-level quotas (never drops error/severe) - GitHub Actions CI (
dart analyze+flutter test) - Real unit tests (levels, ring buffer, masking, sessions, aggregation, export, dispose)
Fixed #
- Crash last-seen timestamp parsed from
CRASH [<iso>]instead ofDateTime.now() - Unconditional
dart:ioremoved from the public orchestration path (web-safe stub store) - Partial init failure cleans up before console/memory fallback
Changed #
- Relabeled previously shipped aggregation work as 0.1.1 (matches git tag
v0.1.1) - Console printing is now internal (ANSI
[appName] [LEVEL] …); noeasy_loggerdependency - Console muted in release by default (
enableConsoleInRelease); profile stays on SEVEREstill writes[SEVERE]to files but prints as[ERROR]on console (easy_logger parity)
Removed #
- Dependency on
easy_logger
0.1.1 - 2026-02-13 #
Improved #
- Aggregation no longer delays unique log messages: Unique messages are now logged to console immediately; only repeated messages are buffered for aggregation. File-level aggregation still applies to all messages.
- Stack trace parsing skipped in release mode: The
Loghelper no longer callsStackTrace.currentin release builds, reducing overhead. - Pre-compiled regex patterns in
Loghelper for faster component detection. - Aggregation buffer capped at 100 entries to prevent unbounded growth during heavy logging bursts.
Removed #
- Removed dead
sendLogsToGitHub()method (always returnedfalse).formatLogsForGitHub()is kept for bug-report formatting.
Documentation #
- Added library-level doc comment to the barrel export file.
- Updated README with performance notes and aggregation behavior.
0.1.0+1 - 2025-01-15 #
Added #
- Initial release of flutter_logging_service package
- LoggingService with file persistence and log rotation
- LogHelper for convenient static logging with auto component detection
- LoggableMixin for automatic component detection in classes
- LoggingConfig for customizable configuration
- Support for log aggregation to reduce noise
- Separate crash log file for severe errors
- Cross-platform support (Android, iOS, Linux, macOS, Windows, Web)