ailog_flutter 0.3.0 copy "ailog_flutter: ^0.3.0" to clipboard
ailog_flutter: ^0.3.0 copied to clipboard

Flutter add-on for ailog: automatic error hooks, navigation breadcrumbs, and a bridge so native Kotlin/Swift code logs into the same JSONL file.

Changelog #

This package is pre-1.0 and under active development, and tracks ailog's version closely — a minor bump in either may break you. Pin exact versions and read both changelogs before upgrading.

0.3.0 #

  • A flutter build release now ships with logging off. This follows ailog 0.4.0, where Logger.create's enabled defaults to !isReleaseBuild: debug and profile are unaffected, and a release build writes nothing to a user's device unless you pass enabled: true (or a runtime flag, for a diagnostics toggle in settings). AilogFlutter.install and runAppGuarded are unchanged — they route errors into whatever logger you hand them, and a disabled one accepts every call and produces nothing. If you ship a way to retrieve the file, opt back in; the README's "Debug / profile / release" section covers both directions.
  • Automatic debug-session sync documented, built on ailog's new installDebugSync + ailog_sync. It is now the first option under "Getting the log off a real device", because it is the only one with no manual step: flutter run already opens the VM Service, so a command on your machine can pull the log continuously while you use the app. Release builds are unaffected — they serve no VM Service at all.
  • AilogLifecycleObserver — foreground/background/termination, with both ends of each transition (paused → resumed). A handful of events over a session, and repeatedly decisive: "crashes when you come back to the app" is invisible in a log that only records what the code did. Defaults to trace, so it stays out of a production file while remaining available as a breadcrumb.
  • User interaction logging documented, built on ailog's new logger.interaction(). Deliberately no automatic "log every tap": measured against a real widget tree, a root Listener plus a hit test recovers a useful label only for text-labelled buttons — an IconButton yields "a button", a TextField nothing — while costing a hit test per pointer-down and carrying a privacy problem regex redaction cannot solve (semantic labels contain user data: a contacts row is labelled with a person's name). The README states this, with the numbers and a recipe for anyone who wants it anyway.
  • runAppGuarded gains capturePrint / forwardPrintsToConsole: plain print() calls (yours or a dependency's) are routed into the structured log via ailog's capturePrints.
  • Depends on ailog ^0.4.0 as a hosted dependency, making the package publishable; local development uses pubspec_overrides.yaml.

0.2.0 #

  • ailog_flutter is now a Flutter plugin (adds android/ and ios/).
  • AilogNativeBridge: forwards native (Kotlin Ailog, Swift Ailog) log calls into the Dart Logger over a MethodChannel, so native and Dart events share one JSONL file with the same redaction/sanitization.
  • Android: Ailog Kotlin API plus a chained Thread.setDefaultUncaughtExceptionHandler that writes crash events directly to the configured JSONL path when the Flutter engine may already be gone.
  • iOS: Ailog Swift API plus a chained NSSetUncaughtExceptionHandler with the same direct-write fallback (Objective-C NSException only — see the README for coverage limitations).
  • ailog: added Logger.logError (log a pre-built ErrorInfo, e.g. from a non-Dart error) and errorFingerprintFromFrames (fingerprint an error from plain frame strings rather than a Dart StackTrace) to support the above.
  • Example app: full android/ios platform scaffolding, plus a button demonstrating the native→Dart round trip.

0.1.0 #

  • Initial release: AilogFlutter.install hooks for FlutterError.onError, PlatformDispatcher.onError and ErrorWidget.builder (all chaining any previously installed handler), AilogNavigatorObserver for route breadcrumbs, and runAppGuarded for zone-scoped main() wiring.
0
likes
150
points
43
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Flutter add-on for ailog: automatic error hooks, navigation breadcrumbs, and a bridge so native Kotlin/Swift code logs into the same JSONL file.

Repository (GitHub)
View/report issues

Topics

#logging #observability #ai #crash-reporting

License

MIT (license)

Dependencies

ailog, flutter

More

Packages that depend on ailog_flutter

Packages that implement ailog_flutter