logger

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, args ...any)

Debug calls [(slog.Logger).Debug] on the Depot logger, if configured.

func DebugContext

func DebugContext(ctx context.Context, msg string, args ...any)

DebugContext calls [(slog.Logger).DebugContext] on the Depot logger, if configured.

func Enabled

func Enabled(ctx context.Context, level slog.Level) bool

Enabled reports whether the logger emits log records at the given context and level.

func Error

func Error(msg string, args ...any)

Error calls [(slog.Logger).Error] on the Depot logger, if configured.

func ErrorContext

func ErrorContext(ctx context.Context, msg string, args ...any)

ErrorContext calls [(slog.Logger).ErrorContext] on the Depot logger, if configured.

func GetLogger

func GetLogger() *slog.Logger

GetLogger returns the Depot logger.

func Info

func Info(msg string, args ...any)

Info calls [(slog.Logger).Info] on the Depot logger, if configured.

func InfoContext

func InfoContext(ctx context.Context, msg string, args ...any)

InfoContext calls [(slog.Logger).InfoContext] on the Depot logger, if configured.

func Log

func Log(ctx context.Context, level slog.Level, msg string, args ...any)

Log calls [(slog.Logger).Log] on the Depot logger, if configured.

func LogAttrs

func LogAttrs(ctx context.Context, level slog.Level, msg string, attrs ...slog.Attr)

LogAttrs calls [(slog.Logger).LogAttrs] on the Depot logger, if configured.

func SetLogger

func SetLogger(l *slog.Logger)

SetLogger sets the Depot logger to the given logger.

func Warn

func Warn(msg string, args ...any)

Warn calls [(slog.Logger).Warn] on the Depot logger, if configured.

func WarnContext

func WarnContext(ctx context.Context, msg string, args ...any)

WarnContext calls [(slog.Logger).WarnContext] on the Depot logger, if configured.

func With

func With(args ...any) *slog.Logger

With calls [(slog.Logger).With] on the default logger.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL