[log] add debug logging to 5 pkg files#28169
Merged
Conversation
Add meaningful log.Printf calls to functions that lacked tracing: - universal_llm_consumer_engine: model resolution, backend selection, secret collection, env application - agentdrain/coordinator: TrainEvent/AnalyzeEvent routing, SaveSnapshots, LoadWeightsJSON - parser/import_error: import item and field location lookups - workflow/known_needs_expressions: filterExpressionsForActivation entry and result - workflow/metrics: FinalizeToolMetrics and FinalizeToolCallsAndSequence completion stats Co-Authored-By: Claude Sonnet 4.6 <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.
Add
log.Printfcalls to 5 files that had loggers defined but insufficient tracing for debugging.Files changed
pkg/workflow/universal_llm_consumer_engine.go— Log model string and resolved backend inresolveUniversalLLMBackendFromModel; log backend and secret count inGetUniversalRequiredSecretNames; log env application and gateway port inApplyUniversalProviderEnvpkg/agentdrain/coordinator.go— Log event stage routing inTrainEventandAnalyzeEvent; log stage count inSaveSnapshots(entry + completion); log byte count and stage count inLoadWeightsJSONpkg/parser/import_error.go— Log found/fallback location infindImportsFieldLocation; log search target and result infindImportItemLocationpkg/workflow/known_needs_expressions.go— Log input counts infilterExpressionsForActivation(entry + filtered result)pkg/workflow/metrics.go— Log finalized stats (turns, tokens, tool calls, sequences) inFinalizeToolMetricsandFinalizeToolCallsAndSequenceValidation
make buildpasses with no compilation errorspkg:filenameconvention (all existing loggers reused)Test plan
make buildsucceeds*_test.gofiles modified🤖 Generated with [Claude Code]((claude.ai/redacted)