Add takeoverConsole for complete console integration#80
Merged
Conversation
Routes all console calls through Rust tracing and outputs Rust logs to the original console methods, creating a unified logging pipeline.
Contributor
Package Changes Through f757777There are 2 changes which include tracing with prerelease, tracing-js with prerelease Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
2c5a565 to
76ff460
Compare
76ff460 to
f757777
Compare
Merged
johncarmack1984
pushed a commit
that referenced
this pull request
Jan 14, 2026
# Version Updates Merging this PR will release new versions of the following packages based on your change files. # tracing ## [0.2.0-canary.19] - 7099260 (#80 by @johncarmack1984) Add `takeoverConsole()` function that completely takes over the webview console, routing all logs through Rust tracing and back to the original console methods. # tracing-js ## [0.2.0-canary.19] - 7099260 (#80 by @johncarmack1984) Add `takeoverConsole()` function that completely takes over the webview console, routing all logs through Rust tracing and back to the original console methods. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.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.
Summary
Add
takeoverConsole()function that completely takes over the webview console.Logging methods (routed to Rust tracing):
log,debug,info,warn,error,trace- standard loggingassert- logs error if condition is falsedir,dirxml,table- object inspection (mapped to debug level)UI/utility methods (NOT replaced - zero IPC overhead):
clear,count,countReset,group,groupCollapsed,groupEnd,time,timeEnd,timeLogAll Rust tracing events are output to the original console methods, creating a unified logging pipeline without infinite loops.
Usage
Test plan
pnpm lintpassespnpm test(20 tests pass)