logx

package
v0.1.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComponentEnabledWithContextForTest added in v0.1.7

func ComponentEnabledWithContextForTest(ctx context.Context, component string) bool

ComponentEnabledWithContextForTest exposes component filtering for package-internal tests that need to verify request-scoped debug wiring.

func DebugCtxf added in v0.1.7

func DebugCtxf(ctx context.Context, component, format string, args ...any)

func Debugf

func Debugf(component, format string, args ...any)

func Enabled

func Enabled() bool

func EnabledAt added in v0.1.7

func EnabledAt(level Level) bool

func EnabledAtWithContextForTest added in v0.1.7

func EnabledAtWithContextForTest(ctx context.Context, level Level) bool

EnabledAtWithContextForTest exposes context-scoped level evaluation for package-internal tests that need to verify request-scoped debug wiring.

func EnabledFor

func EnabledFor(keys ...string) bool

func ErrorCtxf added in v0.1.7

func ErrorCtxf(ctx context.Context, component, format string, args ...any)

func Errorf

func Errorf(component, format string, args ...any)

func InfoCtxf added in v0.1.7

func InfoCtxf(ctx context.Context, component, format string, args ...any)

func Infof

func Infof(component, format string, args ...any)

func WarnCtxf added in v0.1.7

func WarnCtxf(ctx context.Context, component, format string, args ...any)

func Warnf

func Warnf(component, format string, args ...any)

func WithDebug added in v0.1.7

func WithDebug(ctx context.Context, components ...string) context.Context

func WithDebugConfig added in v0.1.7

func WithDebugConfig(ctx context.Context, level Level, components ...string) context.Context

Types

type DebugContext added in v0.1.7

type DebugContext struct {
	Enabled    bool
	Level      Level
	Components map[string]struct{}
}

type Level added in v0.1.7

type Level int
const (
	LevelOff Level = iota
	LevelError
	LevelWarn
	LevelInfo
	LevelDebug
	LevelTrace
)

func CurrentLevel added in v0.1.7

func CurrentLevel() Level

Jump to

Keyboard shortcuts

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