Use Utils logging helpers instead of raw Debug.Log in SDK runtime#299
Merged
Conversation
Replace the four remaining UnityEngine.Debug.Log* calls in the runtime with the SDK's Utils logging helpers so they follow the established convention (LK_DEBUG-gated, "LiveKit"-prefixed): - RtcAudioSource / RtcVideoSource / Rpc: Utils.Debug (compiled out unless LK_DEBUG is defined; RPC errors are often normal app-level results) - TokenSourceComponent: Utils.Warning (developer misconfiguration that should stay visible in all builds) Adds the LiveKit.Internal using to Rpc and TokenSourceComponent, and drops the now-unused UnityEngine using from Rpc. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
Replaces the four remaining raw
UnityEngine.Debug.Log*calls in the SDK runtime (Runtime/Scripts/, excluding generatedProto/) with the SDK'sUtilslogging helpers, so all runtime logging follows the established convention:LK_DEBUG-gated for debug, and"LiveKit"-prefixed.RtcAudioSource.csUnityEngine.Debug.LogUtils.DebugUtils.Debugneighbor and drops the explicit qualifier previously needed to disambiguate fromSystem.Diagnostics.DebugRtcVideoSource.csDebug.LogUtils.DebugRpc.csDebug.LogUtils.DebugTokenSourceComponent.csDebug.LogWarningUtils.WarningSupporting changes:
using LiveKit.Internal;toRpc.csandTokenSourceComponent.cs(whereUtilslives).using UnityEngine;fromRpc.cs.Effect
The three
Utils.Debugconversions now compile out unlessLK_DEBUGis defined (quieter release builds); theUtils.Warningkeeps the token-source warning visible and gains the"LiveKit"prefix.Verification
Compiled the SDK runtime assembly via
dotnet buildonLiveKit.csproj— build succeeded, 0 errors (22 pre-existing, unrelated warnings).🤖 Generated with Claude Code