logger

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

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

func Error

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

func Fatal

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

func Info

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

func InitLogger

func InitLogger(debug bool)

InitLogger 初始化日志

func Panic

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

func Warn

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

func WithOptions

func WithOptions(opts ...zap.Option) *zap.Logger

func ZapLogger

func ZapLogger() *zap.Logger

Types

type Field

type Field struct {
	Key   string
	Value interface{}
}

func AddField

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

func ErrorField

func ErrorField(err error) Field

ErrorField 错误堆栈

Jump to

Keyboard shortcuts

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