mixin_logger
0.2.0, released 4 months ago by mixin.dev
Simple logger for Flutter that prints and saves logs to files.
WASM-ready
What it does
Provides a set of functions to log messages at different levels and optionally write them to a file on disk. It supports cross‑platform file storage and configurable file rotation.
AI-written summary of version 0.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- Need lightweight logging without external dependencies
- Want to persist logs locally for debugging or crash analysis
- Developing a Flutter app that targets Android, iOS, Windows, macOS, or Linux
Skip it when
- Using a full‑featured logging framework like logger or sentry
- Project already uses a custom logging solution
- Targeting Flutter versions older than 3.7.0
Strengths
- Easy to set up and use
- Cross‑platform file support with rotation
- No code generation or build_runner required
Weaknesses
- Requires Flutter 3.7.0 or newer
- Limited to file logging, no remote or analytics integration
- API is very small, lacking advanced features
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
Call initLogger with a directory path before logging; the directory is created automatically.
void main() async {
await initLogger(
'/tmp/app_log_files_dir',
maxFileCount: 10,
maxFileLength: 5 * 1024 * 1024,
);
i('after initLogger');
}Alternatives
Packages that do the same job and could replace mixin_logger.
Works with
Packages commonly used together with mixin_logger: ones it builds on, ones built on it, and its own family.