[log] Add debug logging to under-instrumented wasm/console helpers - #51508
Merged
Conversation
Adds logger.New-based debug logging to five files that had zero or minimal logging: parser wasm include-path resolution and virtual filesystem lookups, the AWF network-allowed helper functions, the color-profile writer, and the wasm console error/tree formatters.
Contributor
Author
|
Hey
Once tests are in place, this PR will be well-positioned for review!
|
Contributor
Author
|
🎉 This pull request is included in a new release. Release: |
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
Adds
pkg/loggerdebug instrumentation to five previously under-instrumented helper files spanning color-profile handling, Wasm console rendering, Wasm parser include/virtual-filesystem resolution, and AWF workflow-call helpers. No functional logic changes; only trace-levelPrintf/Printcalls were inserted and one boolean was captured into a local variable to allow logging before return.Change Classification
Key Changes
colorwriterLognamespace logger; logs writer creation, NO_COLOR detection, and write-error fallbackDEBUGconsoleWasmLognamespace logger; logsFormatErrorinvocation/context rendering andRenderTreeinvocationResolveIncludePath(workflowspec rejection, security boundary violation, file-not-found) via existingparserLogSetVirtualFiles/ClearVirtualFilescalls and eachreadFileFuncresolution path (builtin, user, not-found)awfHelpersLog; logsshouldUseWorkflowCallNetworkAllowedInputresult (captured into local var before return),buildModelsJSONPathExportScript, andbuildWorkflowCallNetworkAllowedUpdateScript(including marshal failure)Impact Assessment
DEBUGenvironment variable and write only to stderr.shouldUseWorkflowCallNetworkAllowedInput(return value captured inresultbefore returning) preserves identical behavior.Commits