Documentation
¶
Index ¶
- Constants
- func Action(action string) slog.Attr
- func Backoff(d time.Duration) slog.Attr
- func BindingMismatchGroup(tokenUserID, apiKeyUserID int64) slog.Attr
- func ClientVersion(clientVersion string) slog.Attr
- func Count(count int) slog.Attr
- func CycleID(id int64) slog.Attr
- func Data(data string) slog.Attr
- func Duration(duration time.Duration) slog.Attr
- func End(t time.Time) slog.Attr
- func EntityID(id string) slog.Attr
- func EntityType(entityType string) slog.Attr
- func Error(err error) slog.Attr
- func ErrorAny(err any) slog.Attr
- func ErrorGroup(err error) slog.Attr
- func ErrorGroupWithStack(err any) slog.Attr
- func FromContext(ctx context.Context) *slog.Logger
- func HTTPStatus(status int) slog.Attr
- func IP(ip string) slog.Attr
- func Message(msg string) slog.Attr
- func MinVersion(minVersion string) slog.Attr
- func NewLogger(w io.Writer, level Level) *slog.Logger
- func NewLoggerFromEnv(w io.Writer) *slog.Logger
- func NewTextLogger(w io.Writer, level Level) *slog.Logger
- func NewTextLoggerFromEnv(w io.Writer) *slog.Logger
- func Path(path string) slog.Attr
- func RateLimitGroup(retryAfter time.Duration, reason string) slog.Attr
- func RequestGroup(r *http.Request) slog.Attr
- func RequestID(requestID string) slog.Attr
- func RequestIP(r *http.Request) slog.Attr
- func RequestMethod(r *http.Request) slog.Attr
- func RequestPath(r *http.Request) slog.Attr
- func ResponseGroup(status int, duration time.Duration) slog.Attr
- func ServerVersion(serverVersion string) slog.Attr
- func SessionID(id string) slog.Attr
- func Since(since string) slog.Attr
- func SinceTime(t time.Time) slog.Attr
- func Stack() slog.Attr
- func Start(t time.Time) slog.Attr
- func Timestamp(ts string) slog.Attr
- func Type(t string) slog.Attr
- func UserGroup(userID int64) slog.Attr
- func UserID(id int64) slog.Attr
- func ValidationGroup(fields map[string]string) slog.Attr
- func Version() slog.Attr
- func WithAttrs(ctx context.Context, attrs ...slog.Attr) context.Context
- func WithLogger(ctx context.Context, logger *slog.Logger) context.Context
- type Level
Constants ¶
View Source
const Default = LevelInfo
View Source
const EnvKey = "LOG_LEVEL"
Variables ¶
This section is empty.
Functions ¶
func BindingMismatchGroup ¶
func ClientVersion ¶
func EntityType ¶
func ErrorGroup ¶
func ErrorGroupWithStack ¶
func HTTPStatus ¶
func MinVersion ¶
func ServerVersion ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.