Documentation
¶
Index ¶
- func Debug(args ...interface{})
- func Debugf(template string, args ...interface{})
- func Debugw(msg string, args ...interface{})
- func DefaultConfig() *config.LogConfig
- func Error(args ...interface{})
- func Errorf(template string, args ...interface{})
- func Errorw(err error, args ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(template string, args ...interface{})
- func Fatalw(msg string, args ...interface{})
- func Info(args ...interface{})
- func Infof(template string, args ...interface{})
- func Infow(msg string, args ...interface{})
- func Sync() error
- func Warn(args ...interface{})
- func Warnf(template string, args ...interface{})
- func Warnw(msg string, args ...interface{})
- type Logger
- func (l *Logger) Debug(args ...interface{})
- func (l *Logger) Debugf(template string, args ...interface{})
- func (l *Logger) Debugw(msg string, args ...interface{})
- func (l *Logger) Error(args ...interface{})
- func (l *Logger) Errorf(template string, args ...interface{})
- func (l *Logger) Errorw(err error, args ...interface{})
- func (l *Logger) Fatal(args ...interface{})
- func (l *Logger) Fatalf(template string, args ...interface{})
- func (l *Logger) Fatalw(msg string, args ...interface{})
- func (l *Logger) GetLogger() *zap.Logger
- func (l *Logger) Info(args ...interface{})
- func (l *Logger) Infof(template string, args ...interface{})
- func (l *Logger) Infow(msg string, args ...interface{})
- func (l *Logger) Sync() error
- func (l *Logger) Warn(args ...interface{})
- func (l *Logger) Warnf(template string, args ...interface{})
- func (l *Logger) Warnw(msg string, args ...interface{})
- type ZapGormLogger
- func (l *ZapGormLogger) Error(ctx context.Context, msg string, data ...interface{})
- func (l *ZapGormLogger) Info(ctx context.Context, msg string, data ...interface{})
- func (l *ZapGormLogger) LogMode(level logger.LogLevel) logger.Interface
- func (l *ZapGormLogger) Trace(ctx context.Context, begin time.Time, ...)
- func (l *ZapGormLogger) Warn(ctx context.Context, msg string, data ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultConfig ¶ added in v0.1.2
DefaultConfig returns the default logger configuration
Types ¶
type Logger ¶ added in v0.1.2
type Logger struct {
// contains filtered or unexported fields
}
func InitLogger ¶
InitLogger initializes and returns a new Logger instance
func WithContext ¶ added in v0.1.2
WithContext returns a new Logger instance with the given context
type ZapGormLogger ¶ added in v0.1.2
type ZapGormLogger struct {
// contains filtered or unexported fields
}
ZapGormLogger is a logger that implements the GORM logger interface using zap
func NewZapGormLogger ¶ added in v0.1.2
func NewZapGormLogger(zapLogger *zap.Logger, level logger.LogLevel) *ZapGormLogger
NewZapGormLogger creates a new ZapGormLogger
func (*ZapGormLogger) Error ¶ added in v0.1.2
func (l *ZapGormLogger) Error(ctx context.Context, msg string, data ...interface{})
Error logs an error message
func (*ZapGormLogger) Info ¶ added in v0.1.2
func (l *ZapGormLogger) Info(ctx context.Context, msg string, data ...interface{})
Info logs an info message
func (*ZapGormLogger) LogMode ¶ added in v0.1.2
func (l *ZapGormLogger) LogMode(level logger.LogLevel) logger.Interface
LogMode sets the log level
Click to show internal directories.
Click to hide internal directories.