log

package
v0.0.0-...-e815181 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package log is a context wrapper around slog.Logger

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendSinks

func AppendSinks(ctx context.Context, s ...slog.Sink) context.Context

func Critical

func Critical(ctx context.Context, msg string, fields ...slog.Field)

func Debug

func Debug(ctx context.Context, msg string, fields ...slog.Field)

func Error

func Error(ctx context.Context, msg string, fields ...slog.Field)

func Fatal

func Fatal(ctx context.Context, msg string, fields ...slog.Field)

func Fork

func Fork(ctx, loggerCtx context.Context) context.Context

func Info

func Info(ctx context.Context, msg string, fields ...slog.Field)

func Leveled

func Leveled(ctx context.Context, level slog.Level) context.Context

func Named

func Named(ctx context.Context, name string) context.Context

func Stderr

func Stderr(ctx context.Context) context.Context

func Stdlib

func Stdlib(ctx context.Context, level slog.Level) *log.Logger

func Sync

func Sync(ctx context.Context)

func Warn

func Warn(ctx context.Context, msg string, fields ...slog.Field)

func With

func WithTB

func WithTB(ctx context.Context, t testing.TB, opts *slogtest.Options) context.Context

WithTB calls With with the result of slogtest.Make.

Types

This section is empty.

Jump to

Keyboard shortcuts

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