Add structured, configurable logging for the host application, frontend, and all ArgyllCMS subprocesses so that users and support can diagnose failures without enabling developer tools.
Scope & Technical Requirements
1. Backend (Rust / Tauri)
Log Management Plugin: Integrate the official tauri-plugin-log (and log crate) to handle file rotation, log levels, and automatic bridging of frontend console logs to the backend.
Log Location: Use Tauri's native app_log_dir() to ensure logs are written to the correct platform-specific directory (e.g., %APPDATA%\ICCery\logs on Windows, ~/.local/share/ICCery/logs or ~/.config/ICCery/logs on Linux/macOS).
Subprocess Logging: Capture stdout and stderr of every spawned Argyll process (targen, printtarg, chartread, colprof, profcheck, iccgamut, instlist, average) and pipe them to the log file with a clear prefix (e.g., [chartread] ...).
Log Levels: Support error, warn, info, debug, trace (default to info in release builds, debug in development).
2. Frontend (HTML / JS)
Settings UI: Add a "Diagnostics" or "Logging" section in the Settings panel containing:
A dropdown to select the global log level.
A toggle for "Enable verbose process logging" (if separate from the global log level).
A button to "Open Log Folder" (using Tauri's open API) and "Copy Log Path".
Error Surfacing: Ensure critical errors that currently only appear in the developer console are forwarded to the logger (handled automatically if tauri-plugin-log is configured to forward console messages) and surfaced in the UI via toasts or alerts where appropriate.
Acceptance Criteria
tauri-plugin-log is integrated and successfully writes rotating log files to the standard OS log directory.
Frontend console.log/error messages are captured in the unified log file.
ArgyllCMS subprocess stdout/stderr streams are captured in the log file with identifiable prefixes.
The Settings panel allows configuring the log level, which persists across app restarts.
A user can click "Open Log Folder" in the Settings UI to reveal the log files in their native file explorer.
No sensitive data (e.g., full paths of user profiles) is logged at info level or above.
Dependencies & Ordering
Milestone: Milestone 10 (v0.5.0)
Ordering: Step 1
Dependencies: None
### Description
Add structured, configurable logging for the host application, frontend, and all ArgyllCMS subprocesses so that users and support can diagnose failures without enabling developer tools.
### Scope & Technical Requirements
#### 1. Backend (Rust / Tauri)
- **Log Management Plugin**: Integrate the official `tauri-plugin-log` (and `log` crate) to handle file rotation, log levels, and automatic bridging of frontend console logs to the backend.
- **Log Location**: Use Tauri's native `app_log_dir()` to ensure logs are written to the correct platform-specific directory (e.g., `%APPDATA%\ICCery\logs` on Windows, `~/.local/share/ICCery/logs` or `~/.config/ICCery/logs` on Linux/macOS).
- **Subprocess Logging**: Capture `stdout` and `stderr` of every spawned Argyll process (`targen`, `printtarg`, `chartread`, `colprof`, `profcheck`, `iccgamut`, `instlist`, `average`) and pipe them to the log file with a clear prefix (e.g., `[chartread] ...`).
- **Log Levels**: Support `error`, `warn`, `info`, `debug`, `trace` (default to `info` in release builds, `debug` in development).
#### 2. Frontend (HTML / JS)
- **Settings UI**: Add a "Diagnostics" or "Logging" section in the Settings panel containing:
- A dropdown to select the global log level.
- A toggle for "Enable verbose process logging" (if separate from the global log level).
- A button to "Open Log Folder" (using Tauri's `open` API) and "Copy Log Path".
- **Error Surfacing**: Ensure critical errors that currently only appear in the developer console are forwarded to the logger (handled automatically if `tauri-plugin-log` is configured to forward console messages) and surfaced in the UI via toasts or alerts where appropriate.
### Acceptance Criteria
- [ ] `tauri-plugin-log` is integrated and successfully writes rotating log files to the standard OS log directory.
- [ ] Frontend `console.log/error` messages are captured in the unified log file.
- [ ] ArgyllCMS subprocess stdout/stderr streams are captured in the log file with identifiable prefixes.
- [ ] The Settings panel allows configuring the log level, which persists across app restarts.
- [ ] A user can click "Open Log Folder" in the Settings UI to reveal the log files in their native file explorer.
- [ ] No sensitive data (e.g., full paths of user profiles) is logged at `info` level or above.
### Dependencies & Ordering
- **Milestone**: Milestone 10 (`v0.5.0`)
- **Ordering**: Step 1
- **Dependencies**: None
gronod
added this to the Milestone 10: Production Ready Features (v0.6.0) milestone 2026-08-29 17:26:13 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Description
Add structured, configurable logging for the host application, frontend, and all ArgyllCMS subprocesses so that users and support can diagnose failures without enabling developer tools.
Scope & Technical Requirements
1. Backend (Rust / Tauri)
tauri-plugin-log(andlogcrate) to handle file rotation, log levels, and automatic bridging of frontend console logs to the backend.app_log_dir()to ensure logs are written to the correct platform-specific directory (e.g.,%APPDATA%\ICCery\logson Windows,~/.local/share/ICCery/logsor~/.config/ICCery/logson Linux/macOS).stdoutandstderrof every spawned Argyll process (targen,printtarg,chartread,colprof,profcheck,iccgamut,instlist,average) and pipe them to the log file with a clear prefix (e.g.,[chartread] ...).error,warn,info,debug,trace(default toinfoin release builds,debugin development).2. Frontend (HTML / JS)
openAPI) and "Copy Log Path".tauri-plugin-logis configured to forward console messages) and surfaced in the UI via toasts or alerts where appropriate.Acceptance Criteria
tauri-plugin-logis integrated and successfully writes rotating log files to the standard OS log directory.console.log/errormessages are captured in the unified log file.infolevel or above.Dependencies & Ordering
v0.5.0)