feat: write logs to debug phone-island messages#103
Merged
Conversation
1581433 to
56014e0
Compare
d1b9eb9 to
6d3fc0d
Compare
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
Forward all console messages from the PhoneIsland renderer window to the main process log file, so that audio/SIP diagnostics are captured in production without requiring DevTools access.
Changes
src/main/classes/windows/PhoneIslandWindow.ts:backgroundThrottling: falseto prevent Chromium from throttling timers/AudioContext when the window is hidden (critical for audio reliability during long holds).console.log/info/warn/error/debugin the renderer to JSON-serialize object arguments, otherwise Chromium'sconsole-messageevent emits[object Object].console-messageand forward each message to the main process via a dedicatedphone-island-logIPC channel.src/main/lib/windowConstructor.ts:config.webPreferencesinside the sharedwebPreferencesblock so that per-window options (likebackgroundThrottling) are not silently dropped by the default values.src/main/main.ts:ipcMain.on('phone-island-log', ...)handler that always writes to the log file, independent ofisDev(), so production installs also record the diagnostics.