27823bb6
log: replace logrus with slog behind auxilia's scribe handler
Every logger field this service owned was a *logrus.Entry threaded
through a constructor, which is what logrus costs for want of a usable
default. They are slog.Default().With("component", ...) now, and the
threading is gone with them; the shared middleware's panic reports land
in the same handler, which is why the daemon sets the default before
anything that can fail.
The handler is scribe's tint handler: level from [dolt.sr.ht]log-level,
source positions, and masks keyed on the attribute path for the three
credentials this service handles — the unified-login cookie, the
Internal fernet token and the Authorization header the remotesapi reads
a PAT or a keypair JWT out of. Errors go through scribe.Err, so a culpa
error's hint reaches the operator on its own line.
logrus stays in go.mod: dolt's remotesrv.ServerArgs takes a
*logrus.Entry and nothing else. It is now confined to Config.DoltLogger,
which is the only place this service names it.
dolt-git-hook is deliberately untouched: what it writes to stderr is the
notice a pushing user reads through git, not a log.
Eugene Blikh <bigbes@gmail.com> — 2026-08-08 20:01:36 UTC
Commit 27823bb627b12760176e7dfa2aaa3a0c8aae1fe0 —
view raw patch
Parent(s):
22ba9fcd
| File | Status | + | − |
|---|---|---|---|
authn/cookie.go
|
M | +5 | -2 |
authn/jwt.go
|
M | +7 | -3 |
cmd/doltsrht/logging.go
|
A | +60 | |
cmd/doltsrht/main.go
|
M | +38 | -17 |
config.example.ini
|
M | +5 | |
go.mod
|
M | +4 | -3 |
go.sum
|
M | +8 | -10 |
remoteapi/credsvc.go
|
M | +10 | -10 |
remoteapi/integration_test.go
|
M | +8 | -3 |
remoteapi/interceptors.go
|
M | +25 | -15 |
remoteapi/interceptors_test.go
|
M | +11 | -3 |
remoteapi/server.go
|
M | +14 | -11 |
web/templates.go
|
M | +5 | -2 |