app_factory_logging 0.2.0 copy "app_factory_logging: ^0.2.0" to clipboard
app_factory_logging: ^0.2.0 copied to clipboard

Privacy-safe structured logging for Flutter apps — centralized redaction, app.runtime-log.v1 events, Riverpod bindings, test fakes, and breadcrumbs.

0.2.0 #

  • Fixed default credential and Authorization/Cookie header redaction for quoted JSON-style keys (including whitespace, case variants, and escaped quoted values) before all outputs.
  • Added the app.runtime-log.v1 structured event contract, stable eventName, one-line JSON framing, optional stage/action/status/duration, correlation IDs, error codes, bounded JSON-safe attributes, and a published JSON Schema.
  • Added centralized fail-closed sanitization for messages, errors, stack traces, attributes, console output, FakeAppLogger, and sinks. The default redactor covers common credentials, Authorization/Cookie values, URL query and fragment data, emails, and phone numbers.
  • Added AppLogEventSink and appLogEventSinkProvider for sanitized event capture without adding a remote logging implementation.
  • Added SanitizingAppLogger for bounded brownfield adaptation of existing custom logging backends.
  • Changed AppLoggerProviderObserver.include to filter every callback and stopped serializing provider values.
  • Changed debugChunked to sanitize the complete input before splitting and cap the number of chunks. Complete response or user payload logging is no longer a supported use case.
  • Kept legacy AppLogger call sites and AppLogSink.write source-compatible. Built-in fakes and sinks now receive sanitized error/stack text, so callers must not rely on original object identity. ConsoleAppLogger.maxMessageLength is now restricted to the Schema range of 0–4096 characters.
  • Enforced configured field and whole-event bounds after truncation, rejected processor settings outside the published Schema contract, and added runtime JSON Schema contract tests for normal, fallback, invalid, deep, and oversized events.

0.1.1 #

  • Changed the license for this and future versions from MIT to the Apache License 2.0 and added the package NOTICE file.

0.1.0 #

  • Breaking (pre-1.0): added AppLogLevel.trace and AppLogger.trace(...). Custom AppLogger implementations and exhaustive AppLogLevel switches must be updated. Existing enum indexes also shift because trace is first. The default minLevel: AppLogLevel.debug continues to filter trace output.
  • Added AppLogScope and AppLogger.forOwner(this) to bind the owner's runtime class name once and omit handwritten tags from subsequent calls.

0.0.2 #

  • Breaking (pre-1.0): console backend is terminal-only via debugPrint. Removed dart:developer, package:logging, and the process-wide Logger.root subscription.
  • Breaking (pre-1.0): removed test helpers debugResetForTest and debugIsHandlerRegisteredForTest (no longer needed without a global handler).
  • Added enableConsoleOutput (defaults to kDebugMode) and optional useAnsiColors (off by default).
  • warn / error still forward to AppLogSink for breadcrumbs; sink failures print a single diagnostic when console output is enabled, without duplicating the exception text.
  • Per-instance enableConsoleOutput / minLevel control.

0.0.1 #

  • Initial release: AppLogger abstraction, ConsoleAppLogger (truncation + debugChunked), FakeAppLogger, generated Riverpod providers, AppLogSink interface, and optional AppLoggerProviderObserver.
0
likes
150
points
135
downloads

Documentation

API reference

Publisher

verified publisheradoptrack.com

Weekly Downloads

Privacy-safe structured logging for Flutter apps — centralized redaction, app.runtime-log.v1 events, Riverpod bindings, test fakes, and breadcrumbs.

Repository (GitHub)
View/report issues

Topics

#logging #riverpod #flutter #debug

License

Apache-2.0 (license)

Dependencies

flutter, flutter_riverpod, riverpod_annotation

More

Packages that depend on app_factory_logging