argoyle a45c50ab7b
logging / coverage-baseline (pull_request) Has been skipped
logging / vulnerabilities (pull_request) Successful in 1m32s
logging / test (pull_request) Successful in 2m48s
pre-commit / pre-commit (pull_request) Successful in 5m27s
feat: move MockLogger into a logtest sub-package
NewMockLogger/MockLogger move from the main `logging` package to a new
`logging/logtest` sub-package, so the production `logging` package's import
graph no longer pulls in testify — only consumers that import logtest do.
testify stays in the module's go.mod (used by logtest and the library's own
tests).

Breaking import change for consumers: `logging.NewMockLogger` becomes
`logtest.NewMockLogger`. The backend services that reference it are updated to
the logtest import alongside their go.mod bump to this release.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 18:34:11 +02:00
2026-06-15 11:52:40 +02:00
2026-06-15 11:52:40 +02:00
2026-06-15 11:52:40 +02:00
2026-06-15 11:52:40 +02:00
2026-06-15 10:07:07 +00:00

logging

Shared logging primitives for Shiny backend services.

  • SetupLogger(level, format, service, version) — configures the slog default logger (text / json / otel) and returns it.
  • ContextWithLogger / LoggerFromContext — carry a logger on the context.
  • NewMockLogger() — test helper for asserting log output.
  • logging/middleware.RequestLogger(logger) — HTTP middleware that debug-logs request/response bodies.

Replaces the logging package (and the middleware request-logger) copied into the backend services.

S
Description
Shared logging primitives (slog setup, context logger, mock logger, request-logger middleware) for Shiny services
Readme 58 KiB
v0.2.0 Latest
2026-06-19 17:06:57 +00:00
Languages
Go 100%