Documentation ¶
Index ¶
- Constants
- Variables
- func Init()
- func Println(level logLevel, label string, message interface{})
- type GormLogger
- func (l *GormLogger) Error(ctx context.Context, s string, args ...interface{})
- func (l *GormLogger) Info(ctx context.Context, s string, args ...interface{})
- func (l *GormLogger) LogMode(gormlogger.LogLevel) gormlogger.Interface
- func (l *GormLogger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)
- func (l *GormLogger) Warn(ctx context.Context, s string, args ...interface{})
Constants ¶
View Source
const ( LogLevelPanic logLevel = "panic" LogLevelFatal logLevel = "fatal" LogLevelError logLevel = "error" LogLevelWarn logLevel = "warn" LogLevelDebug logLevel = "debug" LogLevelTrace logLevel = "trace" LogLevelInfo logLevel = "info" )
Log Level Data Type Constant
Variables ¶
View Source
var ( Logger *logrus.Logger DbLogger *logrus.Logger )
Log Variable
Functions ¶
Types ¶
type GormLogger ¶
type GormLogger struct { SlowThreshold time.Duration SourceField string SkipErrRecordNotFound bool Debug bool }
func NewGormLogger ¶
func NewGormLogger() *GormLogger
func (*GormLogger) Error ¶
func (l *GormLogger) Error(ctx context.Context, s string, args ...interface{})
func (*GormLogger) Info ¶
func (l *GormLogger) Info(ctx context.Context, s string, args ...interface{})
func (*GormLogger) LogMode ¶
func (l *GormLogger) LogMode(gormlogger.LogLevel) gormlogger.Interface
Click to show internal directories.
Click to hide internal directories.