logger

package
v0.1.22 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CtxDebugf

func CtxDebugf(ctx context.Context, format string, v ...interface{})

func CtxErrorf

func CtxErrorf(ctx context.Context, format string, v ...interface{})

func CtxFatalf

func CtxFatalf(ctx context.Context, format string, v ...interface{})

func CtxInfof

func CtxInfof(ctx context.Context, format string, v ...interface{})

func CtxWarnf

func CtxWarnf(ctx context.Context, format string, v ...interface{})

func SetLogLevel

func SetLogLevel(level LogLevel)

func SetLogger

func SetLogger(l Logger)

Types

type LevelLogger

type LevelLogger interface {
	Logger
	SetLevel(level LogLevel)
}

type LogLevel

type LogLevel int
const (
	LogLevelDebug LogLevel = iota
	LogLevelInfo
	LogLevelWarn
	LogLevelError
	LogLevelFatal
)

func GetLogLevel

func GetLogLevel() LogLevel

type Logger

type Logger interface {
	CtxDebugf(ctx context.Context, format string, v ...interface{})
	CtxInfof(ctx context.Context, format string, v ...interface{})
	CtxWarnf(ctx context.Context, format string, v ...interface{})
	CtxErrorf(ctx context.Context, format string, v ...interface{})
	CtxFatalf(ctx context.Context, format string, v ...interface{})
}

Logger Interface for logging

func GetLogger

func GetLogger() Logger

Jump to

Keyboard shortcuts

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