ctxlog

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger = log.New(os.Stderr, "", log.LstdFlags)
View Source
var LoggerContextKey = &contextKey{"logger"}
View Source
var PrefixContextKey = &contextKey{"prefix"}

Functions

func Criticalf

func Criticalf(ctx context.Context, format string, args ...interface{})

func Debugf

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

func Errorf

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

func Infof

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

func LoggerFromContext

func LoggerFromContext(ctx context.Context) *log.Logger

func NewContext

func NewContext(ctx context.Context, prefix string) context.Context

func PrefixFromContext

func PrefixFromContext(ctx context.Context) string

func SetOutput

func SetOutput(w io.Writer)

func Warningf

func Warningf(ctx context.Context, format string, args ...interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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