logging

package
v2.0.0-alpha.13 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func From

func From(ctx context.Context) zerolog.Logger

func New

func New(opts ...Option) zerolog.Logger

func NewFrom

func NewFrom(base Logger, opts ...Option) zerolog.Logger

func With

func With(ctx context.Context, opts ...Option) context.Context

Types

type LogLevel

type LogLevel int8
const (
	DebugLevel LogLevel = iota
	InfoLevel
	WarnLevel
	ErrorLevel
	FatalLevel
	PanicLevel
	NoLevel
	Disabled

	TraceLevel LogLevel = -1
)

func MustParseLogLevel

func MustParseLogLevel(input string) LogLevel

func ParseLogLevel

func ParseLogLevel(input string) (LogLevel, error)

func (LogLevel) String

func (l LogLevel) String() string

type Logger

type Logger = zerolog.Logger

type Option

type Option func(*loggerOptions)

func WithField

func WithField(key string, value any) Option

func WithFields

func WithFields(fields map[string]any) Option

func WithLevel

func WithLevel(level LogLevel) Option

func WithWriter

func WithWriter(writer io.Writer) Option

Jump to

Keyboard shortcuts

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