Documentation
¶
Index ¶
- Constants
- func FromContext(ctx context.Context) *handlerLogger
- func GrpcLogger(opts ...HandlerLogOption) grpc.UnaryServerInterceptor
- func NewGorm(opts ...GormOption) *gormLogger
- func NewHandlerLogger() *handlerLogger
- func RestLogger(opts ...HandlerLogOption) gin.HandlerFunc
- func ToContext(ctx context.Context, log *handlerLogger) context.Context
- func WithDebug(conf *config)
- type GormOption
- type HandlerLogOption
Constants ¶
View Source
const (
TimestampFormat = "2006/01/02 - 15:04:05"
)
Variables ¶
This section is empty.
Functions ¶
func FromContext ¶
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
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
Click to show internal directories.
Click to hide internal directories.