logutil

package
v0.0.26 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildLogger

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

func NewSlogAdapter

func NewSlogAdapter(slogLogger *stdslog.Logger) *slogAdapter

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 NoopLogger added in v0.0.21

type NoopLogger struct{}

func (NoopLogger) Debug added in v0.0.21

func (n NoopLogger) Debug(ctx context.Context, msg string, args ...any)

Debug implements logging.Logger.

func (NoopLogger) Error added in v0.0.21

func (n NoopLogger) Error(ctx context.Context, err error, args ...any)

Error implements logging.Logger.

func (NoopLogger) Info added in v0.0.21

func (n NoopLogger) Info(ctx context.Context, msg string, args ...any)

Info implements logging.Logger.

func (NoopLogger) Log added in v0.0.21

func (n NoopLogger) Log(ctx context.Context, level slog.Level, msg string, args ...any)

Log implements logging.Logger.

func (NoopLogger) Warn added in v0.0.21

func (n NoopLogger) Warn(ctx context.Context, msg string, args ...any)

Warn implements logging.Logger.

func (NoopLogger) With added in v0.0.21

func (n NoopLogger) With(args ...any) logging.Logger

With implements logging.Logger.

func (NoopLogger) WithGroup added in v0.0.21

func (n NoopLogger) WithGroup(name string) logging.Logger

WithGroup implements logging.Logger.

Jump to

Keyboard shortcuts

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