logger

package
v0.0.0-...-d4bbc0e Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DPanicCtx

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

func DebugCtx

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

func ErrorCtx

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

func FatalCtx

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

func GetTraceID

func GetTraceID(ctx context.Context) string

func InfoCtx

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

func NewLogger

func NewLogger(opts ...Option)

func PanicCtx

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

func WarnCtx

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

Types

type Logger

type Logger struct {
	Options
	// contains filtered or unexported fields
}

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithCallerSkip

func WithCallerSkip(skip int) Option

func WithCompress

func WithCompress(b bool) Option

func WithHistoryLogFileName

func WithHistoryLogFileName(fileName string) Option

func WithLogDir

func WithLogDir(dir string) Option

func WithMaxAge

func WithMaxAge(maxAge int) Option

func WithMaxBackups

func WithMaxBackups(backup int) Option

func WithMaxSize

func WithMaxSize(size int) Option

type OptionFunc

type OptionFunc func(*Options)

type Options

type Options struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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