Documentation ¶
Index ¶
- func Debug(args ...interface{})
- func Debugf(template string, args ...interface{})
- func Debugw(msg string, keysAndValues ...interface{})
- func Error(args ...interface{})
- func Errorf(template string, args ...interface{})
- func Errorw(msg string, keysAndValues ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(template string, args ...interface{})
- func Fatalw(msg string, keysAndValues ...interface{})
- func GetZapLogger() *zap.Logger
- func Info(args ...interface{})
- func Infof(template string, args ...interface{})
- func Infow(msg string, keysAndValues ...interface{})
- func InitDevelopmentSugar(opts ...zap.Option)
- func InitProductionSugar(opts ...zap.Option)
- func Panic(args ...interface{})
- func Panicf(template string, args ...interface{})
- func Panicw(msg string, keysAndValues ...interface{})
- func SetSugar(config *zap.Config, opts ...zap.Option)
- func Warn(args ...interface{})
- func Warnf(template string, args ...interface{})
- func Warnw(msg string, keysAndValues ...interface{})
- type Logger
- func (l *Logger) Debug(args ...interface{})
- func (l *Logger) Debugf(template string, args ...interface{})
- func (l *Logger) Debugw(msg string, keysAndValues ...interface{})
- func (l *Logger) Error(args ...interface{})
- func (l *Logger) Errorf(template string, args ...interface{})
- func (l *Logger) Errorw(msg string, keysAndValues ...interface{})
- func (l *Logger) Fatal(args ...interface{})
- func (l *Logger) Fatalf(template string, args ...interface{})
- func (l *Logger) Fatalw(msg string, keysAndValues ...interface{})
- func (l *Logger) Info(args ...interface{})
- func (l *Logger) Infof(template string, args ...interface{})
- func (l *Logger) Infow(msg string, keysAndValues ...interface{})
- func (l *Logger) Panic(args ...interface{})
- func (l *Logger) Panicf(template string, args ...interface{})
- func (l *Logger) Panicw(msg string, keysAndValues ...interface{})
- func (l *Logger) Warn(args ...interface{})
- func (l *Logger) Warnf(template string, args ...interface{})
- func (l *Logger) Warnw(msg string, keysAndValues ...interface{})
- func (l *Logger) With(args ...interface{}) *zap.SugaredLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debugw ¶ added in v1.2.0
func Debugw(msg string, keysAndValues ...interface{})
Debugw package mainLogger
func Errorw ¶ added in v1.2.0
func Errorw(msg string, keysAndValues ...interface{})
Errorw package mainLogger
func Fatalw ¶ added in v1.2.0
func Fatalw(msg string, keysAndValues ...interface{})
Fatalw package mainLogger
func Infow ¶ added in v1.2.0
func Infow(msg string, keysAndValues ...interface{})
Infow package mainLogger
func InitDevelopmentSugar ¶
InitDevelopmentSugar for development encoding being json instead of console, which is practically better for docker's json logger,
func InitProductionSugar ¶
InitProductionSugar for production
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger 定制化 sugar
func NewLoggerOf ¶
NewLoggerOf logger with component field
func (*Logger) With ¶
func (l *Logger) With(args ...interface{}) *zap.SugaredLogger
With adds a variadic number of fields to the logging context. see https://github.com/uber-go/zap/blob/v1.10.0/sugar.go#L91
Click to show internal directories.
Click to hide internal directories.