4d178626
log: bridge dolt's remotesrv logger into slog
remotesrv takes a *logrus.Entry and nothing else, so passing nil left it writing through logrus' standard logger: its own format, its own stream, and no mask between a field named token and the journal. It is the half of this process that serves clones and pushes — the likeliest place for a credential to reach a log field, and the one that was logging around everything the previous commit configured. internal/logrusbridge hands it an entry whose only exit is a logrus.Hook: output to io.Discard, a formatter that produces nothing, and the logrus level left wide open so the slog handler does the filtering from the one setting in config.ini. Fields cross as attributes rather than a formatted blob, which is what lets a mask keyed on the attribute path fire at all. Verified against logrus v1.9.3 rather than assumed: Entry.log fires hooks before it writes, before Logger.Exit and before the panic, so a Fatal or Panic record reaches slog before the process ends. Both arms are tested. The package takes nothing from this service and belongs beside scribe in auxilia; it is here because it was needed here first.
Eugene Blikh <bigbes@gmail.com> — 2026-08-08 20:13:23 UTC
Commit 4d178626e1f2d04330127c394e0684a78a2d7102 —
view raw patch
Parent(s):
6af58599
| File | Status | + | − |
|---|---|---|---|
cmd/doltsrht/main.go
|
M | +6 | |
internal/logrusbridge/logrusbridge.go
|
A | +252 | |
internal/logrusbridge/logrusbridge_test.go
|
A | +220 | |
remoteapi/server.go
|
M | +12 | -4 |