Documentation ¶
Index ¶
Constants ¶
View Source
const MsecLocalTimeFormat = "2006-01-02 15:04:05.000"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface { GetZapLogger() *zap.SugaredLogger LogMode(level gormLogger.LogLevel) gormLogger.Interface Info(ctx context.Context, msg string, data ...interface{}) Warn(ctx context.Context, msg string, data ...interface{}) Error(ctx context.Context, msg string, data ...interface{}) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error) }
Logger is an zap logger, it's an alternative implementation of *gorm.Logger
func InitLogger ¶
func InitLogger(cfg *config.Configuration) (Logger, error)
func NewLogger ¶
func NewLogger(sugar *zap.SugaredLogger) Logger
NewLogger is constructor for logger
Click to show internal directories.
Click to hide internal directories.