You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Replace logrus with stdlib log/slog for structured logging
Migrate the entire codebase from github.com/sirupsen/logrus to Go's
standard library log/slog package. This introduces proper structured
logging with key-value pairs and adds LOG_LEVEL environment variable
support (debug, info, warn, error) for runtime log level configuration.
Key changes:
- Replace logging.Logger interface with type alias to *slog.Logger
- Add ParseLevel() and NewLogger() helpers in pkg/logging
- Add NewWriter() to replace logrus.Logger.Writer() for subprocess
output capture
- Update backends.Logger interface to use slog-compatible signatures
- Convert all log calls from printf-style to structured key-value pairs
- Remove direct logrus dependency (remains as indirect via transitive deps)
Closes#384
* Convert all fmt.Sprintf log calls to slog structured key-value pairs
Address review feedback: replace fmt.Sprintf anti-pattern across the
entire codebase with proper slog structured key-value args so log
aggregation tools can parse/filter/query individual fields.
Also fixes:
- t.Error(fmt.Sprintf(...)) -> t.Errorf(...) (staticcheck S1038)
- Import ordering (gci: standard first, then third-party)
- Race condition in testregistry (concurrent map access in handleBlobUpload)
- Removed unused fmt imports
* Fix lint: gci import ordering and staticcheck S1038
Sort stdlib imports alphabetically in main.go, remove unused fmt
import and trailing blank line in scheduler_test.go, and replace
t.Error(fmt.Sprintf(...)) with t.Errorf(...) in test files.
* Address reviewer feedback: restore Fatal exit behavior, fix structured logging
- Add os.Exit(1) after log.Error where log.Fatal was originally used
(prevents app from continuing with nil backends/listeners)
- Convert all remaining fmt.Sprintf log calls to proper slog key-value
pairs for structured logging benefits
- Restore createLlamaCppConfigFromEnv Fatal exit behavior via exitFunc
- Fix test assertions: restore t.Fatalf for setup errors, use t.Errorf
for assertion checks
- Fix gci import ordering (log/slog in correct alphabetical position)
- Remove trailing newlines from log messages
* fix: resolve rebase conflicts - convert new upstream logrus calls to slog
Convert new logrus-style logging calls (Infof, Errorf, Warnf, Infoln) added
in upstream to slog structured logging pattern. Fix go.mod dependencies and
test file imports after rebase onto latest main.
* fix: resolve rebase conflicts, lint and test fixes after slog migration
- Fixed import ordering (gci) in select_backend_test.go
- Fixed tc.log -> c.log typo in client.go
- Moved logrus from direct to indirect dependency in go.mod
- All tests pass, go vet clean, golangci-lint passes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments