mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-22 06:25:41 +00:00
c64a1e195e
The Discord Rich Presence module deliberately swallows every IPC error so the app stays clean when Discord is not running. The downside: when the status genuinely stops working (Discord client glitches, app id rejected, socket pipe stuck), nothing is logged anywhere and we have no signal. Add debug-build logging at every step of the IPC handshake and every send: - try_connect: separate failure logs for new() vs connect(), success log with the app id. - discord_update_presence: log the rendered details/state on send, log set_activity failures with the underlying error. - discord_clear_presence: log clear success and clear failures. - The pause-path clear_activity inside discord_update_presence likewise logs failures. All log lines are wrapped in #[cfg(debug_assertions)] so they compile out of release builds — no runtime cost or log noise for end users. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>