Documentation
¶
Index ¶
Constants ¶
View Source
const ( AppName = "goety" ParamApp = "app" )
Variables ¶
This section is empty.
Functions ¶
func FromContext ¶
FromContext - fetches the logger from the request context. If no logger is found, returns the base logger.
Types ¶
type Logger ¶
type Logger interface {
Debug(msg string, args ...any)
DebugContext(ctx context.Context, msg string, args ...any)
Enabled(ctx context.Context, level slog.Level) bool
Error(msg string, args ...any)
ErrorContext(ctx context.Context, msg string, args ...any)
Handler() slog.Handler
Info(msg string, args ...any)
InfoContext(ctx context.Context, msg string, args ...any)
Log(ctx context.Context, level slog.Level, msg string, args ...any)
LogAttrs(ctx context.Context, level slog.Level, msg string, attrs ...slog.Attr)
Warn(msg string, args ...any)
WarnContext(ctx context.Context, msg string, args ...any)
With(args ...any) *slog.Logger
WithGroup(name string) *slog.Logger
}
logger interface wrapper
Click to show internal directories.
Click to hide internal directories.