logx

package
v0.38.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Discard added in v0.24.0

func Discard() logx.Logger

Discard returns a logger that silently drops every message. Useful for tests, off-by-default jobs, and any component constructor that must remain operable when a caller passes nil for the logger dependency. The returned value satisfies the full logx.Logger interface so it can be substituted anywhere a real logger is taken.

func Named

func Named(name string) logx.Logger

func NewSLogger

func NewSLogger(name string, callerSkip int, levelFilter ...logx.Level) *slog.Logger

func NewSlogHandler added in v0.21.0

func NewSlogHandler(name string, callerSkip int, levelFilter ...logx.Level) slog.Handler

func SetLevel added in v0.28.0

func SetLevel(level logx.Level)

SetLevel updates the threshold of the root logger and every logger derived from it. It exists so the verbosity captured from the environment at start up can be overridden at runtime and reset between tests.

Types

This section is empty.

Jump to

Keyboard shortcuts

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