logger

package
v0.0.52 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: MIT Imports: 13 Imported by: 8

Documentation

Index

Constants

View Source
const (
	DebugLevel = "debug"
	InfoLevel  = "info"
	WarnLevel  = "warn"
	ErrorLevel = "error"
)

Variables

View Source
var Console *zap.Logger
View Source
var Logger *zap.Logger

Functions

func DPanic

func DPanic(ctx context.Context, msg string, fields ...zap.Field)

func Debug

func Debug(ctx context.Context, msg string, fields ...zap.Field)

func Error

func Error(ctx context.Context, msg string, fields ...zap.Field)

func Fatal

func Fatal(ctx context.Context, msg string, fields ...zap.Field)

func GetLogger

func GetLogger(key string) *zap.Logger

func GetTraceID added in v0.0.38

func GetTraceID(ctx context.Context) string

func Info

func Info(ctx context.Context, msg string, fields ...zap.Field)

func LevelOf

func LevelOf(level Level) zapcore.Level

func NewCtx added in v0.0.36

func NewCtx(traceIds ...string) context.Context

func Panic

func Panic(ctx context.Context, msg string, fields ...zap.Field)

func Warn

func Warn(ctx context.Context, msg string, fields ...zap.Field)

Types

type Level

type Level = string

Jump to

Keyboard shortcuts

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