14 lines
546 B
Markdown
14 lines
546 B
Markdown
|
|
# 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.
|