Skip to content

feat: Structured Logging with tracing [PR #11]#2

Merged
wallydz merged 1 commit intovpnht-rewritefrom
pr11-structured-logging
Feb 21, 2026
Merged

feat: Structured Logging with tracing [PR #11]#2
wallydz merged 1 commit intovpnht-rewritefrom
pr11-structured-logging

Conversation

@wallydz-bot
Copy link

@wallydz-bot wallydz-bot bot commented Feb 21, 2026

PR VPNht#11: Structured Logging

Summary

Adds structured logging with tracing + tracing-subscriber. Logs are JSON-formatted, rotated daily, and written to the app's log directory.

Changes

Backend (src-tauri/)

  • src/logging.rs: Logging initialization.
    • JSON file output with daily rotation via tracing-appender.
    • Pretty stderr output for development.
    • Environment-based filter (RUST_LOG or default info,vpnht=debug).
    • Includes thread IDs, file/line numbers, and targets.
  • src/main.rs: Calls logging::init_logging() on app setup (release builds only).

Log Location

  • Linux: ~/.local/share/com.vpnht.desktop/logs/vpnht.log
  • macOS: ~/Library/Logs/com.vpnht.desktop/vpnht.log
  • Windows: %APPDATA%/com.vpnht.desktop/logs/vpnht.log

Files Changed

  • src-tauri/src/logging.rs (new)
  • src-tauri/src/main.rs (modified)

@wallydz wallydz merged commit 5ea7c83 into vpnht-rewrite Feb 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant