Documentation
¶
Index ¶
- func Default() *slog.Logger
- func DeleteGoroutineLogger(gid uint64)
- func From(ctx context.Context) *slog.Logger
- func GetBaseLogger() *slog.Logger
- func GetGoroutineID() uint64
- func InheritRequestLogger(ctx context.Context) (cleanup func())
- func Init() *slog.Logger
- func Inject(ctx context.Context, l *slog.Logger) context.Context
- func Middleware() gin.HandlerFunc
- func StoreGoroutineLogger(gid uint64, logger *slog.Logger)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteGoroutineLogger ¶
func DeleteGoroutineLogger(gid uint64)
func GetBaseLogger ¶
GetBaseLogger returns the base logger for use in middleware (avoids loops)
func GetGoroutineID ¶
func GetGoroutineID() uint64
func InheritRequestLogger ¶
Add this helper function:
func Middleware ¶
func Middleware() gin.HandlerFunc
func StoreGoroutineLogger ¶
Helper functions for middleware to access the goroutine map
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.