Skip to main content

structured_log 0.3.2+1 copy "structured_log: ^0.3.2+1" to clipboard
structured_log: ^0.3.2+1 copied to clipboard

Structured logging for Dart, inspired by Python's structlog. Log JSON with context binding.

0.3.2+1 #

  • DOCS(structured_log_riverpod): document the package and list it in the family.

0.3.2 #

  • FEAT(structured_log_logging): add a bridge from package:logging (#108).

0.3.1 #

  • FIX(structured_log): let a toJson() that leads back to its object cost only its field.
  • FIX(structured_log): encode toJson() again and redact through it.
  • FEAT(structured_log_drift): add a drift QueryInterceptor (#110).
  • DOCS(ru): rewrite literal translations across package READMEs and docs (#104).

0.3.0+1 #

  • DOCS: lead every package README with its purpose and features (#102).

0.3.0 #

Note: This release has breaking changes.

  • PERF(structured_log): count a rotating file's size instead of asking the file system on every write.
  • FIX(structured_log): keep a log call from ever throwing, and encode what jsonEncode refuses.
  • FEAT(structured_log): print from sinks, and escape logfmt so a value cannot forge a line.
  • DOCS(structured_log): describe 0.3.0 and how to migrate to it.
  • BREAKING FEAT(structured_log): move the file outputs to io.dart, so the main library needs no dart:io.
  • BREAKING FEAT(structured_log): follow the current configuration, check the level first, take error and stackTrace.
  • BREAKING FEAT(structured_log): write timestamps in UTC by default.

0.2.2+1 #

  • DOCS(ru): rename the headings that were calques, with their anchors.
  • DOCS(ru): rewrite literal translations across the Russian docs.
  • DOCS(structured_log): describe the whole project in the core package's README.
  • DOCS: cross-link the emb/ packages from each other's READMEs.

0.2.2 #

  • FEAT(structured_log): redact sensitive values, at any depth (#70).

0.2.1 #

  • Graduate package to a stable release. See pre-releases prior to this version for changelog entries.

0.2.1-dev.0 #

  • FEAT: restructure monorepo into emb/backend/frontend/packages, scaffold structured_log_server and structured_log_http.
  • DOCS(ru): smooth over literal-translation calques across all Russian docs (#52).

0.2.0+1 #

  • Graduate package to a stable release. See pre-releases prior to this version for changelog entries.

0.2.0-dev.0+1 #

  • DOCS: add README.md/README.ru.md for the new Flutter packages.

Change Log #

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

2026-09-10 #

Changes #


Packages with breaking changes:

  • There are no breaking changes in this release.

Packages with other changes:

Packages graduated to a stable release (see pre-releases prior to the stable version for changelog entries):

  • structured_log - v0.2.0

structured_log - v0.2.0

0.2.0 #

  • Graduate package to a stable release. See pre-releases prior to this version for changelog entries.

2026-09-10 #

Changes #


Packages with breaking changes:

  • There are no breaking changes in this release.

Packages with other changes:


structured_log - v0.2.0-dev.5

  • DOCS: expand dartdoc with detailed descriptions and usage examples.
  • DOCS: update file list in AGENTS.md structure section.
  • DOCS: clean up CHANGELOG.md after melos version's auto-generated entry.

0.2.0-dev.5 #

  • DOCS: expand dartdoc with detailed descriptions and usage examples.
  • DOCS: update file list in AGENTS.md structure section.
  • DOCS: clean up CHANGELOG.md after melos version's auto-generated entry.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased #

0.2.0-dev.4 - 2026-09-10 #

Fixed #

  • StructlogConfiguration.initialContext is now actually applied — getLogger() previously stored it but never read it, so it had no effect on any log entry despite being documented as merged in before bind()/inline context. bind()/inline context still override an initialContext key of the same name, matching the documented merge order.

0.2.0-dev.3 - 2026-09-10 #

Added #

  • LogLevel.trace — a new level below debug, plus BoundLogger.trace(). Filtered out by a sink's default minLevel (debug) unless a sink explicitly sets minLevel: LogLevel.trace, so high-volume detail (e.g. raw protocol frames) can be gated purely by level, with no category tagging needed. coloredConsoleOutput renders it in grey.

0.2.0-dev.2 - 2026-09-10 #

Added #

  • test/integration_test.dart — integration tests exercising the package as a whole system on real files (correlation + processors + multi-sink routing combined, mixed sync/async sinks, full rotation history across numbered backups, coloredConsoleOutput's real printed format), as a complement to the existing component-level unit tests
  • AsyncFileOutput and AsyncRotatingFileOutput — non-blocking counterparts of fileOutput/rotatingFileOutput that use async dart:io File APIs instead of writeAsStringSync, so logging doesn't block the calling isolate. Writes are serialized and delivered in order; a failing write is caught and reported to stderr without stopping the writes queued after it. Exposes a flushed future to await pending writes (e.g. in tests or before process exit)
  • doc/ARCHITECTURE.md — internal design docs for contributors, with Mermaid class/sequence/flow diagrams of the log call lifecycle and multi-sink routing
  • doc/ARCHITECTURE.ru.md — Russian translation of the architecture doc
  • "How It Works" section in README.md/README.ru.md with a Mermaid flowchart of the logging pipeline for consumers
  • Cross-links between the English/Russian README and architecture docs

0.2.0-dev.1 - 2026-09-09 #

Added #

  • LogCorrelation and BoundLogger.withCorrelation() for typed correlation fields (sessionId, requestId, connectionGeneration, toolCallId, messageId, operationId), serialized under fixed snake_case keys and inherited/overridable through child loggers
  • LogSink and StructlogConfiguration(sinks: ...) for multi-output routing: one log entry can be delivered to multiple destinations with independent minLevel/categories filtering, runtime enable/disable via StructlogConfiguration.setSinkEnabled(), and per-sink error isolation

Changed #

  • Updated repository URL to https://github.com/pese-git/structured_log.git
  • Added FVM (Flutter Version Management) configuration
  • Added Melos scripts for development workflow (analyze, format, test, lint, build, example, clean)
  • Added .gitignore for Dart/FVM project
  • Removed unused imports from source files
  • Removed deprecated author field from pubspec.yaml
  • Formatted all source files with dart format

0.1.0 - 2026-04-27 #

Added #

  • Initial release of structured_log
  • BoundLogger with immutable bind() / unbind() context binding
  • Log levels: debug, info, warning, error, critical
  • Processors: dropNullValues, addTimestamp, addLogLevel, jsonRenderer, logfmtRenderer
  • Output formats: default JSON console, colored console, file, rotating file
  • Global configuration via StructlogConfiguration.configure()
  • Example usage in example/main.dart
  • Basic test suite
1
likes
160
points
1.22k
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

Structured logging for Dart, inspired by Python's structlog. Log JSON with context binding.

Homepage
Repository (GitHub)
View/report issues

Topics

#logging #structured-logging #json #debugging

License

MIT (license)

Dependencies

meta

More

Packages that depend on structured_log