Documentation ¶
Index ¶
- func New(config Config) *zap.Logger
- type Config
- type Logger
- func (l *Logger) Debug(args ...interface{})
- func (l *Logger) Debugf(msg string, args ...interface{})
- func (l *Logger) Debugw(msg string, args ...interface{})
- func (l *Logger) Error(args ...interface{})
- func (l *Logger) Errorf(msg string, args ...interface{})
- func (l *Logger) Errorw(msg string, args ...interface{})
- func (l *Logger) Fatal(args ...interface{})
- func (l *Logger) Fatalf(msg string, args ...interface{})
- func (l *Logger) Fatalw(msg string, args ...interface{})
- func (l *Logger) Info(args ...interface{})
- func (l *Logger) Infof(msg 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(msg string, args ...interface{})
- func (l *Logger) Warnw(msg string, args ...interface{})
- func (l *Logger) With(args ...interface{}) logging.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶
type Logger struct {
SugaredLogger *zap.SugaredLogger
}
Logger implements this library's Logger interface using Uber's Zap logging library. Configuration of Zap is handled externally.
func NewLogger ¶
func NewLogger(sugaredLogger *zap.SugaredLogger) *Logger
NewLogger accepts a pre-configured Zap "sugared" logger, and returns a wrapped logger that satisfies this library's logging interface.
func (*Logger) Debug ¶
func (l *Logger) Debug(args ...interface{})
Debug logs a log entry at debug level.
func (*Logger) Debugf ¶
Debugf logs a log entry at debug level, using a given formatting string and arguments.
func (*Logger) Debugw ¶
Debugw logs a log entry at debug level, using the given message, and field pairs as arguments.
func (*Logger) Error ¶
func (l *Logger) Error(args ...interface{})
Error logs a log entry at error level.
func (*Logger) Errorf ¶
Errorf logs a log entry at error level, using a given formatting string and arguments.
func (*Logger) Errorw ¶
Errorw logs a log entry at error level, using the given message, and field pairs as arguments.
func (*Logger) Fatalf ¶
Fatalf logs a log entry at fatal level, using a given formatting string and arguments.
func (*Logger) Fatalw ¶
Fatalw logs a log fatal at error level, using the given message, and field pairs as arguments.
func (*Logger) Info ¶
func (l *Logger) Info(args ...interface{})
Info logs a log entry at info level.
func (*Logger) Infof ¶
Info logs a log entry at info level, using a given formatting string and arguments.
func (*Logger) Infow ¶
Infow logs a log entry at info level, using the given message, and field pairs as arguments.
func (*Logger) Sync ¶
Sync attempts to flush the existing log entries synchronously using the underlying Zap logger.
func (*Logger) Warn ¶
func (l *Logger) Warn(args ...interface{})
Warn logs a log entry at warning level.
func (*Logger) Warnf ¶
Warnf logs a log entry at warning level, using a given formatting string and arguments.