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
{{ message }}
Repository navigation
cleanup: replace custom handleWarning() with remote.NewWarningLogger() #2314
The CLI logs entirely through logrus — there is no log/slog import anywhere in the tree today, and the context logger is built in internal/trace/context.go / cmd/oras/internal/command/logger.go. NewWarningLogger takes a *slog.Logger.
This needs a small internal/logutil package: a slog.Handler that forwards records to the context's logrus.FieldLogger, preserving the registry field. Roughly 15–30 lines.
Ship the bridge in this PR, not ahead of it, so it does not land as dead code. The same bridge is the prerequisite for ClientBuilder.Logger / ClientBuilder.WarningLogger adoption in the ClientBuilder issue.
Acceptance
internal/logutil bridges slog → the context logrus logger
handleWarning deleted; all four call sites use remote.NewWarningLogger()
Warning dedup per registry is preserved (test it — the current behaviour logs each distinct warning value once per registry)
Activity