log

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(args ...interface{})

Debug logs the given arguments at the debug logging level.

func Debugf

func Debugf(format string, args ...interface{})

Debugf takes a formatted template string and template arguments for the debug logging level.

func Error

func Error(args ...interface{})

Error logs the given arguments at the error logging level.

func Errorf

func Errorf(format string, args ...interface{})

Errorf takes a formatted template string and template arguments for the error logging level.

func FromContext added in v0.12.0

func FromContext(ctx context.Context) logger.Logger

FromContext retrieves the logger from context. Falls back to global logger.

func Get

func Get() logger.Logger

func Info

func Info(args ...interface{})

Info logs the given arguments at the info logging level.

func Infof

func Infof(format string, args ...interface{})

Infof takes a formatted template string and template arguments for the info logging level.

func Nested

func Nested(fields ...interface{}) logger.Logger

Nested returns a new logger with hard coded key-value pairs

func Set

func Set(l logger.Logger)

func Trace

func Trace(args ...interface{})

Trace logs the given arguments at the trace logging level.

func Tracef

func Tracef(format string, args ...interface{})

Tracef takes a formatted template string and template arguments for the trace logging level.

func Warn

func Warn(args ...interface{})

Warn logs the given arguments at the warning logging level.

func Warnf

func Warnf(format string, args ...interface{})

Warnf takes a formatted template string and template arguments for the warning logging level.

func WithFields

func WithFields(fields ...interface{}) logger.MessageLogger

WithFields returns a message logger with multiple key-value fields.

func WithLogger added in v0.12.0

func WithLogger(ctx context.Context, lgr logger.Logger) context.Context

WithLogger returns a new context with the provided logger attached.

func WithNested added in v0.12.0

func WithNested(ctx context.Context, fields ...any) (context.Context, logger.Logger)

WithNested gets the logger from context, creates a nested logger with the provided key-value fields, and returns both the new context and the nested logger.

Types

This section is empty.

Jump to

Keyboard shortcuts

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