feat(client): Enhance Log Viewer with Categories, Filtering, and Per-Session Tracing - #12
Merged
Merged
Conversation
Implements a major enhancement to the client-side log viewer and underlying logging infrastructure. Key changes include: - **Log Categories & Filtering:** Introduces 'api', 'sse', 'error', and 'system' categories. The log viewer UI now includes filter buttons to toggle visibility for each category, allowing developers to focus on relevant events. - **Per-Session SSE Tracing:** The SSE file trace mechanism now creates a separate log file for each session (). This dramatically improves the experience of debugging a specific user session. - **Log File Rotation:** Implemented an automatic cleanup and eviction policy for the session trace directory to manage disk space usage by removing old or oversized logs. - **Frontend Console Bridge:** and messages from the frontend are now bridged to the Tauri backend, ensuring they are captured in the main application log file in production builds.
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.
Summary
This PR significantly enhances the debugging and observability capabilities of the Deck client by introducing several new features to the logging system and the Log Viewer UI.
Key Changes
✨ Log Viewer Filtering:
API,SSE,Error, orSystem.🗂️ Per-Session SSE Tracing:
sessionsdirectory, with one.jsonlfile persession_id.🌉 Frontend Log Bridge:
log_frontend_message) has been added.console.errorandconsole.warnare now automatically forwarded to the Rust backend and captured in the maindeck.log. This allows us to capture critical frontend errors that might otherwise be lost in production desktop builds.How to Test
API,SSE,Error,System).<App Log Dir>/sessions/) and confirm that.jsonlfiles are being created for your sessions.