logger

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(w io.Writer, format LogFormat, level stdslog.Level) logging.Logger

Types

type LogFormat

type LogFormat string
var (
	TextFormat   LogFormat = "TEXT"
	JSONFormat   LogFormat = "JSON"
	PrettyFormat LogFormat = "PRETTY"
)

func (*LogFormat) MarshalText

func (l *LogFormat) MarshalText() ([]byte, error)

func (*LogFormat) UnmarshalText

func (l *LogFormat) UnmarshalText(text []byte) error

type PrettyHandler

type PrettyHandler struct {
	// contains filtered or unexported fields
}

func NewPrettyHandler

func NewPrettyHandler(w io.Writer, opts *stdslog.HandlerOptions) *PrettyHandler

func (*PrettyHandler) Enabled

func (h *PrettyHandler) Enabled(_ context.Context, level stdslog.Level) bool

func (*PrettyHandler) Handle

func (h *PrettyHandler) Handle(ctx context.Context, r stdslog.Record) error

func (*PrettyHandler) WithAttrs

func (h *PrettyHandler) WithAttrs(attrs []stdslog.Attr) stdslog.Handler

func (*PrettyHandler) WithGroup

func (h *PrettyHandler) WithGroup(name string) stdslog.Handler

Jump to

Keyboard shortcuts

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