Repository navigation
Feat/structured logging - #5
Open
BrawlerXull wants to merge 3 commits into
Open
BrawlerXull wants to merge 3 commits into
BrawlerXull wants to merge 3 commits into
Conversation
- AppLogger now builds LogRecords (time, level, tag, message, error, stack trace) and hands info-and-above to an attached LogSink; debug records stay console-only. - main() no longer overrides debugPrint, so raw prints and framework output are no longer persisted. FlutterError.onError and PlatformDispatcher.onError now log uncaught errors. - LogDatabaseHelper (renamed from log_databse_helper.dart) is a singleton sink: schema v2 with level/tag/error/stack columns, batched writes (errors flushed immediately), and pruning to 7 days / 5000 entries on open. The v1 table is dropped on upgrade: it held untyped debugPrint lines that could include task contents. - Logs page: level filter chips, tag filter, level colours, expandable stack traces and a Copy button for bug reports. LogsController takes its store via the constructor. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Replaces ~125 raw debugPrint/print calls and the three loggy calls with tagged AppLogger calls, and drops the loggy dependency. - Privacy: stop logging task contents (descriptions, tags, annotations, whole task maps/JSON), profile names, full deep-link URIs (query strings can carry task text) and push-notification response bodies. Log UUIDs and counts instead. - Errors now carry their stack traces as arguments instead of being interpolated into the message or printed as a separate line. - Previously silent catches now log a warning where the failure is unexpected (report loading, .taskrc parsing, directory moves, tour display); expected ones stay silent with a comment saying why. - Routine flow traces are debug-level (console only); emoji and fragment messages are rewritten as sentences. - Cleanup: remove commented-out print code and the dead commented-out home-widget click handlers (plus the two fields only they used), the unused printDatabaseContents(), unused imports, and rename utilites.dart -> utilities.dart. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Logs page: Copy now replaces the current snackbar, so its result is not queued behind a sticky one (e.g. "TaskServer is not configured"). - Home widget: the "project filter" debug flag used the wrong sentinel and always reported true; it now mirrors the filter's own check. - Home app bar: the Taskserver sync failure catch now logs a warning instead of discarding the error. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Please include a summary of the change and which issue is fixed. List any dependencies that are required for this change.
Fixes #(issue_no)
Replace
issue_nowith the issue number which is fixed in this PRScreenshots
Checklist