Skip to content

feat(logging): one log file with rotation, and Open logs / Copy diagnostics in Help #1760

Closed

Description

@ZhuchkaTriplesix

Problem

The app has no persistent log. Everything goes to `debugPrint` (about 77 call sites with ad-hoc prefixes, plus `logIgnored` with 54). The only file logs are the extension sandbox ones (`security_audit.log`, `.log`). `FlutterError.onError` and `runZonedGuarded` in `main.dart` also only `debugPrint`. A user cannot send us what happened: the macOS connection-save bug (#1757) had to be diagnosed by running the app from a terminal. (Whether Finder-launched macOS builds make these lines reachable at all is unverified.)

Proposal

  • A small `QueryaLog` in `lib/core/util` that writes timestamped lines (level, area, message, stack) to a file in the app data root (`AppDataRoot`, so portable mode stays portable), with size-based rotation (for example 5 files of 2 MB).
  • `debugPrint` stays for the console; `logIgnored` and the global handlers in `main.dart` also write to the file.
  • Never log passwords, connection strings or SQL text; redact the user part of URLs.
  • Help menu: Open logs folder and Copy diagnostics (version, OS, last N log lines).
  • Tests for rotation, redaction and a failing file sink (logging must never throw).

Part of the error-handling epic.

Activity

  1. added
    enhancementNew feature or request
    error-handlingTheme parser epic label: error-handling
    stabilityTheme parser epic label: stability
    P2Medium priority / Parity & Refactoring
    on Oct 25, 2026
  2. added 2 commits that reference this issue on Oct 25, 2026
  3. ZhuchkaTriplesix commented on Oct 25, 2026

    @ZhuchkaTriplesix
    MemberAuthor

    Fixed on dev in #1790, #1793 (merged). Closing by hand: the PRs target dev, so GitHub would only close this when dev is merged into main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium priority / Parity & RefactoringenhancementNew feature or requesterror-handlingTheme parser epic label: error-handlingstabilityTheme parser epic label: stability

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions