Documentation ¶
Index ¶
- func Debug(msg string, ctx ...interface{})
- func Error(msg string, ctx ...interface{})
- func Info(msg string, ctx ...interface{})
- func Warn(msg string, ctx ...interface{})
- type Logger
- type MysqlLogger
- func (s *MysqlLogger) Debug(v ...interface{})
- func (s *MysqlLogger) Debugf(format string, v ...interface{})
- func (s *MysqlLogger) Error(v ...interface{})
- func (s *MysqlLogger) Errorf(format string, v ...interface{})
- func (s *MysqlLogger) Info(v ...interface{})
- func (s *MysqlLogger) Infof(format string, v ...interface{})
- func (s *MysqlLogger) IsShowSQL() bool
- func (s *MysqlLogger) Level() core.LogLevel
- func (s *MysqlLogger) SetLevel(l core.LogLevel)
- func (s *MysqlLogger) ShowSQL(show ...bool)
- func (s *MysqlLogger) Warn(v ...interface{})
- func (s *MysqlLogger) Warnf(format string, v ...interface{})
- type ZapLoggerWapper
- func (z *ZapLoggerWapper) Debug(msg string, ctx ...interface{})
- func (z *ZapLoggerWapper) Error(msg string, ctx ...interface{})
- func (z *ZapLoggerWapper) Info(msg string, ctx ...interface{})
- func (z *ZapLoggerWapper) Warn(msg string, ctx ...interface{})
- func (z *ZapLoggerWapper) With(ctx ...interface{}) Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶
type Logger interface { With(ctx ...interface{}) Logger Debug(msg string, ctx ...interface{}) Info(msg string, ctx ...interface{}) Warn(msg string, ctx ...interface{}) Error(msg string, ctx ...interface{}) }
Logger interface
type MysqlLogger ¶
type MysqlLogger struct {
// contains filtered or unexported fields
}
MysqlLogger
func NewMysqlLogger ¶
func NewMysqlLogger(w *zap.Logger) *MysqlLogger
NewMysqlLogger return a pointer to MysqlLogger
func (*MysqlLogger) Debugf ¶
func (s *MysqlLogger) Debugf(format string, v ...interface{})
Debugf ...
func (*MysqlLogger) Errorf ¶
func (s *MysqlLogger) Errorf(format string, v ...interface{})
Errorf ...
type ZapLoggerWapper ¶
type ZapLoggerWapper struct {
// contains filtered or unexported fields
}
ZapLoggerWapper zap logger wapper
func NewZapLoggerWrapper ¶
func NewZapLoggerWrapper(logger *zap.SugaredLogger) *ZapLoggerWapper
NewZapLoggerWrapper return a pointer to ZapLoggerWapper
func (*ZapLoggerWapper) Debug ¶
func (z *ZapLoggerWapper) Debug(msg string, ctx ...interface{})
Debug ...
func (*ZapLoggerWapper) Error ¶
func (z *ZapLoggerWapper) Error(msg string, ctx ...interface{})
Error ...
func (*ZapLoggerWapper) Info ¶
func (z *ZapLoggerWapper) Info(msg string, ctx ...interface{})
Info ...
func (*ZapLoggerWapper) Warn ¶
func (z *ZapLoggerWapper) Warn(msg string, ctx ...interface{})
Warn ...
func (*ZapLoggerWapper) With ¶
func (z *ZapLoggerWapper) With(ctx ...interface{}) Logger
With return a new Logger with context
Click to show internal directories.
Click to hide internal directories.