logger

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimestampFormat = "2006/01/02 - 15:04:05"
)

Variables

This section is empty.

Functions

func FromContext

func FromContext(ctx context.Context) *handlerLogger

func GrpcLogger

func GrpcLogger(opts ...HandlerLogOption) grpc.UnaryServerInterceptor

func NewGorm

func NewGorm(opts ...GormOption) *gormLogger

func NewHandlerLogger

func NewHandlerLogger() *handlerLogger

func RestLogger

func RestLogger(opts ...HandlerLogOption) gin.HandlerFunc

func ToContext

func ToContext(ctx context.Context, log *handlerLogger) context.Context

func WithDebug

func WithDebug(conf *config)

Types

type GormOption

type GormOption func(conf *config)

func WithTimeFormat

func WithTimeFormat(timeFmt string) GormOption

type HandlerLogOption

type HandlerLogOption func(conf *handlerLogConfig)

func WithGinDebug

func WithGinDebug(level logrus.Level) HandlerLogOption

Jump to

Keyboard shortcuts

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