fix: keep libwebrtc quiet by default and make logToDebug work again - #273
Merged
devopvoid merged 1 commit intoSep 7, 2026
Merged
Conversation
Since the m152 update, libwebrtc initializes its logging configuration on the first log line, with everything from LS_INFO upwards written to stderr, and that configuration can be set only once. Its debug output no longer consults the severity set by LogMessage::LogToDebug, so Logging.logToDebug had no effect and every application got the full INFO log on stderr, on every platform. The library now initializes the configuration when it is loaded, with the debug output disabled, which restores the previous behavior of staying silent unless asked. Logging.logToDebug registers a log sink that writes to the debugger output on Windows and to stderr elsewhere, which is where libwebrtc wrote before; a sink can be added and removed at any time, so the severity remains adjustable at runtime.
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.
Since the m152 update, libwebrtc initializes its logging configuration on the first log line, with everything from INFO upwards written to stderr, and that configuration can be set only once. Its debug output no longer consults the severity set by
LogMessage::LogToDebug, soLogging.logToDebughad no effect and every application got the full INFO log on stderr, on every platform, which is what #262 reports. The library now initializes the configuration when it is loaded, with the debug output disabled, which restores the previous behavior of staying silent unless asked.Logging.logToDebugregisters a log sink that writes to the debugger output on Windows and to stderr elsewhere, where libwebrtc wrote before; a sink can be added and removed at any time, so the severity stays adjustable at runtime. The CI test logs show the effect directly: the INFO lines libwebrtc printed on every lane since m152 are gone.Fixes #262