Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustInitialize ¶
MustInitialize configures labkit's shared logger to emit structured JSON logs and returns a component-scoped logger plus a close function to defer in main(). Call this once, at the start of main(), before creating any other loggers. Exits the process if logger initialization fails.
func NewGrpcLogger ¶
func NewGrpcLogger(component string) (*logrus.Entry, grpc.UnaryServerInterceptor)
NewGrpcLogger returns a component-scoped logger and a gRPC interceptor that emits access logs. MustInitialize must be called first (typically in main()), or the returned logger and access logs fall back to labkit's default text format.
func NewHttpLogger ¶
NewHttpLogger returns a component-scoped logger and an HTTP handler that emits access logs. MustInitialize must be called first (typically in main()), or the returned logger and access logs fall back to labkit's default text format.
Types ¶
This section is empty.