Documentation
¶
Index ¶
- func Any(key string, value interface{}) func(ctx context.Context) zap.Field
- func Float64(key string, value float64) func(ctx context.Context) zap.Field
- func Immutable(key string, value interface{}) func(ctx context.Context) zap.Field
- func Int64(key string, value int64) func(ctx context.Context) zap.Field
- func New(zapLogger *zap.Logger, opts ...Option) logger.Interface
- func SetGormDBLogger(db *gorm.DB, l logger.Interface)
- func String(key string, value string) func(ctx context.Context) zap.Field
- func Uint64(key string, value uint64) func(ctx context.Context) zap.Field
- type Logger
- func (l Logger) Error(ctx context.Context, msg string, args ...interface{})
- func (l Logger) Info(ctx context.Context, msg string, args ...interface{})
- func (l *Logger) LogMode(level logger.LogLevel) logger.Interface
- func (l Logger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)
- func (l Logger) Warn(ctx context.Context, msg string, args ...interface{})
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetGormDBLogger ¶ added in v0.0.3
SetGormDBLogger set db logger
Types ¶
type Logger ¶
Logger logger for gorm2
type Option ¶
type Option func(l *Logger)
Option logger/recover option
func WithConfig ¶
WithConfig optional custom logger.Config
Click to show internal directories.
Click to hide internal directories.