logger

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2024 License: BSD-3-Clause-Clear Imports: 8 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigPrefix = ""

Functions

func FromContext

func FromContext(ctx context.Context) *slog.Logger

FromContext retrieves a logger from the context. If there is none, it returns the default logger.

func NewContext

func NewContext(ctx context.Context, l *slog.Logger) context.Context

NewContext adds the logger to the context.

func NewStdLog

func NewStdLog(key string, debug bool, log *slog.Logger) *stdLoggerish

func Setup

func Setup() *slog.Logger

Types

type Error

type Error struct {
	Msg  string
	Data []any
}

func NewError

func NewError(msg string, data ...any) *Error

func (*Error) Error

func (e *Error) Error() string

Jump to

Keyboard shortcuts

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