Skip to content

refactor: migrate from logrus to log/slog#871

Open
acouvreur wants to merge 1 commit into
compose-spec:mainfrom
acouvreur:use-slog
Open

refactor: migrate from logrus to log/slog#871
acouvreur wants to merge 1 commit into
compose-spec:mainfrom
acouvreur:use-slog

Conversation

@acouvreur
Copy link
Copy Markdown

Replace all github.com/sirupsen/logrus usages with the stdlib log/slog package, addressing #815.

  • cli/options.go: 4 logrus.Warnf -> slog.Warn
  • paths/home.go: 1 logrus.Warn -> slog.Warn
  • transform/external.go: 1 logrus.Warnf -> slog.Warn
  • template/template.go: 1 logrus.Warnf -> slog.Warn
  • loader/loader.go: 2 logrus.Warning -> slog.Warn
  • loader/interpolate.go: 2 logrus.Warnf -> slog.Warn

Test helpers updated to redirect slog.Default() to an in-memory buffer/handler instead of patching the logrus global.

logrus removed from go.mod / go.sum via go mod tidy.

This does not introduce a way to customize the slog logger.

Replace all github.com/sirupsen/logrus usages with the stdlib log/slog
package, addressing compose-spec#815.

- cli/options.go: 4 logrus.Warnf -> slog.Warn
- paths/home.go: 1 logrus.Warn -> slog.Warn
- transform/external.go: 1 logrus.Warnf -> slog.Warn
- template/template.go: 1 logrus.Warnf -> slog.Warn
- loader/loader.go: 2 logrus.Warning -> slog.Warn
- loader/interpolate.go: 2 logrus.Warnf -> slog.Warn

Test helpers updated to redirect slog.Default() to an in-memory
buffer/handler instead of patching the logrus global.

logrus removed from go.mod / go.sum via go mod tidy.

Signed-off-by: Alexis Couvreur <alexiscouvreur.pro@gmail.com>
@acouvreur acouvreur requested a review from ndeloof as a code owner May 13, 2026 17:54
@acouvreur acouvreur changed the title feat: migrate from logrus to log/slog refactor: migrate from logrus to log/slog May 13, 2026
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