logging

package
v0.0.0-...-984cbf5 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TraceLevel = log.TraceLevel
	DebugLevel = log.DebugLevel
	InfoLevel  = log.InfoLevel
	WarnLevel  = log.WarnLevel
	ErrorLevel = log.ErrorLevel
	FatalLevel = log.FatalLevel
)

Variables

This section is empty.

Functions

func AddCallerSkip

func AddCallerSkip(ctx context.Context, skip int) context.Context

func Debug

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

func Error

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

func Fatal

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

func Info

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

func SetLogger

func SetLogger(ctx context.Context, logger Logger) context.Context

func SetLoggingFields

func SetLoggingFields(ctx context.Context) context.Context

func Trace

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

func Warn

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

Types

type Field

type Field = log.Field

func Any

func Any(key string, value interface{}) Field

func Bool

func Bool(key string, value bool) Field

func Duration

func Duration(key string, value time.Duration) Field

func ErrorValue

func ErrorValue(value error) Field

func Int

func Int(key string, value int) Field

func Int64

func Int64(key string, value int64) Field

func String

func String(key, value string) Field

func Strings

func Strings(key string, value []string) Field

type Level

type Level = log.Level

type Logger

type Logger interface {
	log.Logger
}

func GetLogger

func GetLogger(ctx context.Context) Logger

func NewJournaldLogger

func NewJournaldLogger(level Level) Logger

func NewLogger

func NewLogger(config *logging_config.LoggingConfig) Logger

func NewStderrLogger

func NewStderrLogger(level Level) Logger

Jump to

Keyboard shortcuts

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