Skip to content

chore: migrate log.Printf to log/slog in server management and control - #536

Open
nirlep1204 wants to merge 1 commit into
BaaRai:mainfrom
nirlep1204:chore/migrate-slog-server
Open

nirlep1204 wants to merge 1 commit into
BaaRai:mainfrom
nirlep1204:chore/migrate-slog-server

Conversation

@nirlep1204

Copy link
Copy Markdown

Summary

This PR continues the structured logging migration initiated in #523 and #533 by converting 24 legacy log.Printf call sites across server management and control components to structured log/slog (slog.Info, slog.Warn, slog.Error).

Scope of Changes

  • server/customtool.go: Python interpreter detection
  • server/llmpool.go: LLM circuit breaker and pool chain management
  • server/server_mgmt.go: Agent prompts, triggers, tool bindings, skills, and profile cleanup
  • server/task_archive_remote.go: Task archive deletion & remote cleanup pending logs
  • server/task_control.go: Task pause/resume state transitions
  • server/task_outcome.go: Outcome query failure handling
  • server/traffic_hooks.go: Tamper hooks loading and error logging
  • server/triage.go: Triage client initialization and URL validation

Compatibility & Standards

  • All existing [tag] prefixes (e.g. [llmpool], [task], [skills], [traffic]) are strictly preserved for compatibility with the log sink parser (server/logsink.go) and frontend log badge filters.
  • Replaced format strings with structured key-value attributes ("task_id", "profile_id", "err", etc.).

Test Plan

  • gofmt -l server/ (clean)
  • go build ./... (passes with exit 0)
  • go vet ./server (passes with exit 0)
  • go test -v -run TestParseLog ./server (passes with exit 0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant