logd
0.10.8, released 4 days ago by pccria.dev
Modular hierarchical logging engine for Dart and Flutter with background pipelines.
What it does
logd provides structured, hierarchical logging for Dart and Flutter applications. It features modular pipeline processing, ambient context propagation, O(1) configuration resolution, and support for offloading I/O to background isolates.
AI-written summary of version 0.10.6, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need hierarchical, dot-separated loggers with parent-child configuration inheritance.
- You want to offload formatting and disk or network I/O to background isolates to prevent UI hitching.
- You need ambient structured context propagation across async boundaries without boilerplate parameter threading.
Skip it when
- You only need a simple, single-file print wrapper with no requirements for structure or performance.
- Your project avoids extra dependencies and can rely solely on standard print or basic packages.
Strengths
- Background isolate offloading for sinks prevents blocking the UI thread.
- Hierarchical configuration with pattern-matching globs.
- Ambient structured context (MDC) flows automatically through microtasks and async boundaries.
Weaknesses
- Requires learning its custom pipeline and handler configuration model.
- Advanced output features rely on separate satellite packages (e.g., logd_dio, logd_sqlite).
Setup
- Kind
- FFI (native library)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 7
not documented
import 'package:logd/logd.dart';
void main() {
final logger = Logger.get('app');
logger.info('Server started');
logger.warning('Disk space low', context: {'freeGb': 1.2});
logger.error('Connection failed', error: e, stackTrace: st);
}Alternatives
Packages that do the same job and could replace logd.
- easy_logger
A lightweight Flutter logger with configurable levels, build‑mode control and custom printer.
42Compare - df_log
A Dart logging utility offering styled, tag‑filtered, in‑memory logs with JSON export and callbacks.
72Compare - performance
Performance overlay package for Flutter apps that works on web.
50Compare - surf_logger
Production-level logger utility for Dart and Flutter with strategy-based configuration.
50Compare
Works with
Packages commonly used together with logd: ones it builds on, ones built on it, and its own family.
- source_spanlogd depends on itStandard representation for source code locations, spans, and human-friendly error messages.
- ffilogd depends on itUtilities for working with Foreign Function Interface (FFI) code in Dart.
- source_mapslogd depends on itA Dart library to parse, build, and manipulate source map v3 files.
- matcherlogd depends on itSupport for specifying test expectations via an extensible Matcher class.
- characterslogd depends on itUnicode and grapheme cluster aware string manipulation operations for Dart.
- timezonelogd depends on itTime zone databases and time zone aware DateTime class in Dart.