Skip to main content

Release structured_logger 1.0.2 and dio_interceptor 1.2.0

· 2 min read
Altamir
Maintainer

We published two stable releases of the structured_logger ecosystem on pub.dev:

  • structured_logger 1.0.2
  • structured_logger_dio_interceptor 1.2.0

Quick upgrade

dependencies:
structured_logger: ^1.0.2
structured_logger_dio_interceptor: ^1.2.0

Or via CLI:

dart pub add structured_logger:^1.0.2
dart pub add structured_logger_dio_interceptor:^1.2.0

There are no breaking changes to the public API — just bump your dependencies.

structured_logger 1.0.2

UTC timestamps in @t

LogModel now sets @t with DateTime.now().toUtc().toIso8601String() instead of local time.

This aligns CLEF events with the spec (UTC) and fixes the Now filter in CLEF Viewer, which compares timestamps in UTC. Previously, apps in different time zones could appear “late” or “in the future” in live mode.

// Before: @t in local time
// Now: @t always UTC (e.g. 2026-06-30T13:45:00.123Z)
await logger.info('Order {orderId} placed', data: {'orderId': 'ORD-42'});

The API (StructureLogger, SinkSeq, sinks, templates) is unchanged.

structured_logger_dio_interceptor 1.2.0

Query params as filterable properties

Each request query parameter is emitted as a top-level queryParam.<name> property:

// GET /api/orders?page=2&status=open
// Properties: queryParam.page=2, queryParam.status=open

In CLEF Viewer (or Seq), you can filter by queryParam.page=2 with a single click on the property chip.

JWT obfuscation

JWT tokens in headers, query params, and bodies are obfuscated in logs (eyJhbG...***). Original Dio request headers are not modified — only what goes into the structured log.

Other improvements

  • Query params embedded in the URL are extracted when Dio's queryParameters is empty.
  • The path field in REQUEST / RESPONSE / ON_ERROR events no longer includes the query string, keeping the path consistent across events.

See the Dio interceptor guide for full setup.

Compatibility

PackageVersionDepends on
structured_logger1.0.2
structured_logger_dio_interceptor1.2.0structured_logger ^1.0.2

Documentation

Installation guides and docs have been updated to reflect the new versions:

Thanks to everyone who tested the -dev builds and shared feedback. Issues and PRs are welcome on GitHub.