loggy
2.0.3, released 4 years ago by infinum.com
Logger for Dart and Flutter applications using mixins for separation
WASM-ready
What it does
Loggy provides a customizable logging framework for Dart and Flutter apps. It leverages class mixins to automatically capture and display the calling class context, while supporting custom printers, filters, log levels, and global logging.
AI-written summary of version 2.0.3, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want structured console logs showing which class or mixin made the log call
- You need custom log formatting, printers, and filtering based on log types or levels
Skip it when
- You only require a basic, zero-config print wrapper without mixins or custom printers
- You are looking for a remote crash-reporting service rather than a console/stream logger
Strengths
- Uses mixins to automatically identify the calling class and logger type
- Highly customizable with different printers, log levels, and filters
- Supports global logging and child/detached loggers
Weaknesses
- Requires classes to use specific mixins for full class-name context tracking
- Relies on additional sub-packages for specific Flutter or Dio integrations
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
Call Loggy.initLoggy() in main() as soon as possible before running the app.
import 'package:loggy/loggy.dart';
main() {
Loggy.initLoggy();
}
class DoSomeWork with UiLoggy {
DoSomeWork() {
loggy.debug('This is debug message');
}
}Alternatives
Packages that do the same job and could replace loggy.
Works with
Packages commonly used together with loggy: ones it builds on, ones built on it, and its own family.
- stack_traceloggy depends on itProvides parsing, inspection, and readable formatting of Dart stack traces.
- flutter_loggy_dioBuilt on loggyProvides a Dio interceptor and pretty printer for Loggy logs.
- easy_onvifBuilt on loggyDart implementation of ONVIF IP camera and NVR client for device control and streaming.
- flutter_loggyBuilt on loggyLoggy extension to use 'developer.log' with pretty printer in Flutter
- obs_websocketBuilt on loggyAn OBS WebSocket client written in Dart for remote-controlling Open Broadcaster Software.
- google_visionBuilt on loggyIntegrates Google Vision REST API features for image analysis and OCR.
- ytBuilt on loggyNative Dart interface to YouTube REST APIs including Data, Live Streaming, and Analytics.