Documentation ¶
Index ¶
- Variables
- func InitAccessLogger(basePath string)
- func InitRecoveryLogger(basePath string)
- func InitServerLogger(basePath string)
- func RecoveryWithZap(logger *zap.Logger, stack bool) gin.HandlerFunc
- type Logger
- func (l Logger) Error(ctx context.Context, str string, args ...interface{})
- func (l Logger) Info(ctx context.Context, str string, args ...interface{})
- func (l Logger) LogMode(level gorm_logger.LogLevel) gorm_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, str string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
View Source
var AccessLogger *zap.Logger
View Source
var RecoveryLogger *zap.Logger
Functions ¶
func InitAccessLogger ¶
func InitAccessLogger(basePath string)
func InitRecoveryLogger ¶
func InitRecoveryLogger(basePath string)
func InitServerLogger ¶
func InitServerLogger(basePath string)
func RecoveryWithZap ¶
func RecoveryWithZap(logger *zap.Logger, stack bool) gin.HandlerFunc
Types ¶
type Logger ¶ added in v0.0.12
type Logger struct { ZapLogger *zap.Logger LogConfig gorm_logger.Config }
func NewSqlLogger ¶ added in v0.0.12
func NewSqlLogger(zapLogger *zap.Logger, logConfig gorm_logger.Config) Logger
func (Logger) LogMode ¶ added in v0.0.12
func (l Logger) LogMode(level gorm_logger.LogLevel) gorm_logger.Interface
Click to show internal directories.
Click to hide internal directories.