Documentation
¶
Index ¶
- Variables
- func Debug(a ...interface{})
- func Debugf(format string, a ...interface{})
- func Debugw(msg string, keyvals ...interface{})
- func Error(a ...interface{})
- func ErrorPanic(err interface{})
- func ErrorStack(err error)
- func Errorf(format string, a ...interface{})
- func Errorw(msg string, keyvals ...interface{})
- func Fatal(a ...interface{})
- func Fatalf(format string, a ...interface{})
- func Fatalw(msg string, keyvals ...interface{})
- func GetCore() zapcore.Core
- func Info(a ...interface{})
- func Infof(format string, a ...interface{})
- func Infow(msg string, keyvals ...interface{})
- func Init(c []*core.Conf) core.Logger
- func SetLogger(logger *ZapLogger)
- func Warn(a ...interface{})
- func Warnf(format string, a ...interface{})
- func Warnw(msg string, keyvals ...interface{})
- func WithCore(c zapcore.Core, kv ...interface{}) zapcore.Core
- 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) Error(a ...interface{})
- func (s *ZapLogger) Errorf(format string, a ...interface{})
- func (s *ZapLogger) Errorw(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) 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) With(kv ...interface{}) *ZapLogger
- type ZapLoggerEx
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultLogger = std.NewStdCore(zapcore.DebugLevel)
DefaultLogger is default logger.
Functions ¶
Types ¶
type ZapLogger ¶
type ZapLogger struct {
// contains filtered or unexported fields
}
func GetLogger ¶
func GetLogger() *ZapLogger
GetLogger returns global logger appliance as logger in current process.
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.