Documentation ¶
Overview ¶
Package basiclogger provides a basic logger implementing est.Logger, for demonstration and testing purposes.
Index ¶
- func New(w io.Writer) est.Logger
- type GormLogger
- func (gl *GormLogger) Error(ctx context.Context, msg string, args ...interface{})
- func (gl *GormLogger) Info(ctx context.Context, msg string, args ...interface{})
- func (gl *GormLogger) LogMode(level logger.LogLevel) logger.Interface
- func (gl *GormLogger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)
- func (gl *GormLogger) Warn(ctx context.Context, msg string, args ...interface{})
- type Logger
- func (l *Logger) Debug(v ...interface{})
- func (l *Logger) Debugf(format string, v ...interface{})
- func (l *Logger) Debugw(msg string, keysAndValues ...interface{})
- func (l *Logger) Error(v ...interface{})
- func (l *Logger) Errorf(format string, v ...interface{})
- func (l *Logger) Errorw(msg string, keysAndValues ...interface{})
- func (l *Logger) Info(v ...interface{})
- func (l *Logger) Infof(format string, v ...interface{})
- func (l *Logger) Infow(msg string, keysAndValues ...interface{})
- func (l *Logger) With(args ...interface{}) est.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GormLogger ¶
type GormLogger struct {
// contains filtered or unexported fields
}
GormLogger wraps the Logger to implement GORM's logger.Interface
func NewGormLogger ¶
func NewGormLogger(estLogger est.Logger) *GormLogger
NewGormLogger creates a new GormLogger using the provided est.Logger
func (*GormLogger) Error ¶
func (gl *GormLogger) Error(ctx context.Context, msg string, args ...interface{})
func (*GormLogger) Info ¶
func (gl *GormLogger) Info(ctx context.Context, msg string, args ...interface{})
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is a zerolog-based logger implementing est.Logger.
func (*Logger) Debug ¶
func (l *Logger) Debug(v ...interface{})
Debug uses fmt.Sprint to construct and log a message.
func (*Logger) Error ¶
func (l *Logger) Error(v ...interface{})
Error uses fmt.Sprint to construct and log a message.
func (*Logger) Info ¶
func (l *Logger) Info(v ...interface{})
Info uses fmt.Sprint to construct and log a message.
Click to show internal directories.
Click to hide internal directories.