Documentation
¶
Index ¶
- type Option
- type Options
- type ZapLogger
- func (s *ZapLogger) Debug(a ...interface{})
- func (s *ZapLogger) Debugf(format string, a ...interface{})
- func (s *ZapLogger) Debugw(msg string, keyvals ...interface{})
- func (s *ZapLogger) DebugwCtx(ctx context.Context, msg string, keyvals ...interface{})
- func (s *ZapLogger) Error(a ...interface{})
- func (s *ZapLogger) Errorf(format string, a ...interface{})
- func (s *ZapLogger) Errorw(msg string, keyvals ...interface{})
- func (s *ZapLogger) ErrorwCtx(ctx context.Context, msg string, keyvals ...interface{})
- func (s *ZapLogger) Fatal(a ...interface{})
- func (s *ZapLogger) Fatalf(format string, a ...interface{})
- func (s *ZapLogger) Fatalw(msg string, keyvals ...interface{})
- func (s *ZapLogger) Info(a ...interface{})
- func (s *ZapLogger) Infof(format string, a ...interface{})
- func (s *ZapLogger) Infow(msg string, keyvals ...interface{})
- func (s *ZapLogger) InfowCtx(ctx context.Context, msg string, keyvals ...interface{})
- func (s *ZapLogger) Log(level log.Level, keyvals ...interface{}) error
- func (s *ZapLogger) LogRoundTrip(req *http.Request, res *http.Response, err error, start time.Time, ...) error
- func (s *ZapLogger) Printf(format string, args ...interface{})
- func (s *ZapLogger) Println(a ...interface{})
- func (s *ZapLogger) RequestBodyEnabled() bool
- func (s *ZapLogger) ResponseBodyEnabled() bool
- func (s *ZapLogger) Warn(a ...interface{})
- func (s *ZapLogger) Warnf(format string, a ...interface{})
- func (s *ZapLogger) Warnw(msg string, keyvals ...interface{})
- func (s *ZapLogger) WarnwCtx(ctx context.Context, msg string, keyvals ...interface{})
- func (s *ZapLogger) With(kv ...interface{}) *ZapLogger
- func (s *ZapLogger) WithOpts(opts ...Option) *ZapLogger
- type ZapLoggerEx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
Options is Log Options.
type ZapLogger ¶
type ZapLogger struct {
// contains filtered or unexported fields
}
func (*ZapLogger) Debug ¶
func (s *ZapLogger) Debug(a ...interface{})
Debug logs a message at debug level.
func (*ZapLogger) Error ¶
func (s *ZapLogger) Error(a ...interface{})
Error logs a message at error level.
func (*ZapLogger) Fatal ¶
func (s *ZapLogger) Fatal(a ...interface{})
Fatal logs a message at fatal level.
func (*ZapLogger) Info ¶
func (s *ZapLogger) Info(a ...interface{})
Info logs a message at info level.
func (*ZapLogger) LogRoundTrip ¶
func (s *ZapLogger) LogRoundTrip( req *http.Request, res *http.Response, err error, start time.Time, dur time.Duration, ) error
LogRoundTrip prints the information about request and response.
func (*ZapLogger) RequestBodyEnabled ¶
RequestBodyEnabled makes the client pass request body to logger
func (*ZapLogger) ResponseBodyEnabled ¶
ResponseBodyEnabled makes the client pass response body to logger
func (*ZapLogger) Warn ¶
func (s *ZapLogger) Warn(a ...interface{})
Warn logs a message at warn level.
type ZapLoggerEx ¶
type ZapLoggerEx struct {
ZapLogger
}
func NewZapLoggerEx ¶
func NewZapLoggerEx(core zapcore.Core) *ZapLoggerEx
func (*ZapLoggerEx) Error ¶
func (s *ZapLoggerEx) Error(err error, msg string, keysAndValues ...interface{})
Error logs an error condition.
func (*ZapLoggerEx) Info ¶
func (s *ZapLoggerEx) Info(msg string, keysAndValues ...interface{})
Click to show internal directories.
Click to hide internal directories.