Skip to content

[log] add debug logging to 5 pkg files#28169

Merged
pelikhan merged 1 commit intomainfrom
add-debug-logging-pkg-workflow-agentdrain-parser-f706b4c6e6c41317
Apr 23, 2026
Merged

[log] add debug logging to 5 pkg files#28169
pelikhan merged 1 commit intomainfrom
add-debug-logging-pkg-workflow-agentdrain-parser-f706b4c6e6c41317

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Add log.Printf calls 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 in resolveUniversalLLMBackendFromModel; log backend and secret count in GetUniversalRequiredSecretNames; log env application and gateway port in ApplyUniversalProviderEnv
  • pkg/agentdrain/coordinator.go — Log event stage routing in TrainEvent and AnalyzeEvent; log stage count in SaveSnapshots (entry + completion); log byte count and stage count in LoadWeightsJSON
  • pkg/parser/import_error.go — Log found/fallback location in findImportsFieldLocation; log search target and result in findImportItemLocation
  • pkg/workflow/known_needs_expressions.go — Log input counts in filterExpressionsForActivation (entry + filtered result)
  • pkg/workflow/metrics.go — Log finalized stats (turns, tokens, tool calls, sequences) in FinalizeToolMetrics and FinalizeToolCallsAndSequence

Validation

  • make build passes with no compilation errors
  • All log arguments are simple values (no side-effecting calls)
  • No test files modified
  • Logger naming follows pkg:filename convention (all existing loggers reused)

Test plan

  • make build succeeds
  • 5 files modified (≤ 5 limit)
  • No *_test.go files modified
  • No duplicate logging added
  • All logger arguments are side-effect free

🤖 Generated with [Claude Code]((claude.ai/redacted)

Generated by Go Logger Enhancement · ● 1.1M ·

  • expires on Apr 25, 2026, 9:38 PM UTC

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>
@github-actions github-actions Bot added automation enhancement New feature or request labels Apr 23, 2026
@pelikhan pelikhan merged commit f596323 into main Apr 23, 2026
46 checks passed
@pelikhan pelikhan deleted the add-debug-logging-pkg-workflow-agentdrain-parser-f706b4c6e6c41317 branch April 23, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant