xlog

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// With calls Logger.With on the default logger.
	With func(args ...any) *slog.Logger

	// WithGroup Logger.WithGroup on the default logger.
	WithGroup func(name string) *slog.Logger

	// Debug calls Logger.Debug on the default logger.
	Debug func(msg string, args ...any)

	// DebugContext calls Logger.DebugContext on the default logger.
	DebugContext func(ctx context.Context, msg string, args ...any)

	// Info calls Logger.Info on the default logger.
	Info func(msg string, args ...any)

	// InfoContext calls Logger.InfoContext on the default logger.
	InfoContext func(ctx context.Context, msg string, args ...any)

	// Warn calls Logger.Warn on the default logger.
	Warn func(msg string, args ...any)

	// WarnContext calls Logger.WarnContext on the default logger.
	WarnContext func(ctx context.Context, msg string, args ...any)

	// Error calls Logger.Error on the default logger.
	Error func(msg string, args ...any)

	// ErrorContext calls Logger.ErrorContext on the default logger.
	ErrorContext func(ctx context.Context, msg string, args ...any)

	// Log calls Logger.Log on the default logger.
	Log func(ctx context.Context, level slog.Level, msg string, args ...any)

	// LogAttrs calls Logger.LogAttrs on the default logger.
	LogAttrs func(ctx context.Context, level slog.Level, msg string, attrs ...slog.Attr)
)

Functions

func MyLogger

func MyLogger() *slog.Logger

MyLogger returns the default Logger.

func SetLogger

func SetLogger(l *slog.Logger)

SetLogger makes l 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