logger

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: CC0-1.0 Imports: 3 Imported by: 0

Documentation

Overview

Package logger provides logging utilities for the binder project. Trace-level functions are compiled as no-ops by default for zero overhead on hot paths. Build with -tags=debug_trace to enable them.

Index

Constants

View Source
const (
	LevelUndefined = logger.LevelUndefined
	LevelFatal     = logger.LevelFatal
	LevelPanic     = logger.LevelPanic
	LevelError     = logger.LevelError
	LevelWarning   = logger.LevelWarning
	LevelInfo      = logger.LevelInfo
	LevelDebug     = logger.LevelDebug
	LevelTrace     = logger.LevelTrace
)

Variables

This section is empty.

Functions

func CtxWithLogger

func CtxWithLogger(ctx context.Context, l logger.Logger) context.Context

func DebugFields

func DebugFields(ctx context.Context, message string, fields field.AbstractFields)

func Debugf

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

func ErrorFields

func ErrorFields(ctx context.Context, message string, fields field.AbstractFields)

func Errorf

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

func FromCtx

func FromCtx(ctx context.Context) logger.Logger

func InfoFields

func InfoFields(ctx context.Context, message string, fields field.AbstractFields)

func Infof

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

func Logf

func Logf(ctx context.Context, level logger.Level, format string, args ...any)

func Trace

func Trace(_ context.Context, _ ...any)

Trace is a no-op when debug_trace build tag is not set.

func TraceFields

func TraceFields(_ context.Context, _ string, _ field.AbstractFields)

TraceFields is a no-op when debug_trace build tag is not set.

func Tracef

func Tracef(_ context.Context, _ string, _ ...any)

Tracef is a no-op when debug_trace build tag is not set.

func WarnFields

func WarnFields(ctx context.Context, message string, fields field.AbstractFields)

func Warnf

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

Types

type Level

type Level = logger.Level

Level is a type alias for convenience.

type Logger

type Logger = logger.Logger

Logger is a type alias for convenience.

Jump to

Keyboard shortcuts

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