Documentation ¶
Index ¶
- func BindFlags(flags *pflag.FlagSet)
- func Debugf(format string, args ...interface{})
- func Errorf(format string, args ...interface{})
- func Fatalf(format string, args ...interface{})
- func Infof(format string, args ...interface{})
- func IsDebugEnabled() bool
- func IsTraceEnabled() bool
- func ParseFlags(flags *pflag.FlagSet)
- func Prettyf(msg string, obj interface{})
- func Secretf(format string, args ...interface{})
- func Tracef(format string, args ...interface{})
- func UseZap(flags *pflag.FlagSet)
- func Warnf(format string, args ...interface{})
- type Logger
- type Verbose
- type ZapLogger
- func (zap ZapLogger) Debugf(format string, args ...interface{})
- func (zap ZapLogger) Errorf(format string, args ...interface{})
- func (zap ZapLogger) Fatalf(format string, args ...interface{})
- func (logger ZapLogger) GetEncoder() zapcore.Encoder
- func (logger ZapLogger) GetEncoderConfig() zapcore.EncoderConfig
- func (logger ZapLogger) GetLevel() *zapapi.AtomicLevel
- func (zap ZapLogger) Infof(format string, args ...interface{})
- func (zap ZapLogger) IsDebugEnabled() bool
- func (zap ZapLogger) IsTraceEnabled() bool
- func (zap ZapLogger) Prettyf(msg string, obj interface{})
- func (zap ZapLogger) Secretf(format string, args ...interface{})
- func (zap ZapLogger) SetLogLevel(level int)
- func (zap ZapLogger) Tracef(format string, args ...interface{})
- func (zap ZapLogger) V(level int) Verbose
- func (zap ZapLogger) Warnf(format string, args ...interface{})
- func (zap ZapLogger) WithValues(keysAndValues ...interface{}) Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDebugEnabled ¶
func IsDebugEnabled() bool
func IsTraceEnabled ¶
func IsTraceEnabled() bool
func ParseFlags ¶ added in v1.4.0
func Prettyf ¶ added in v1.3.0
func Prettyf(msg string, obj interface{})
Prettyf is like Tracef, but pretty prints the entire struct
Types ¶
type Logger ¶
type Logger interface { Warnf(format string, args ...interface{}) Infof(format string, args ...interface{}) Errorf(format string, args ...interface{}) Debugf(format string, args ...interface{}) Tracef(format string, args ...interface{}) Fatalf(format string, args ...interface{}) WithValues(keysAndValues ...interface{}) Logger IsTraceEnabled() bool IsDebugEnabled() bool SetLogLevel(level int) V(level int) Verbose }
func NewLogrusLogger ¶ added in v1.4.1
func NewLogrusLogger(existing logrusapi.Ext1FieldLogger) Logger
func StandardLogger ¶
func StandardLogger() Logger
func WithValues ¶ added in v1.4.2
func WithValues(keysAndValues ...interface{}) Logger
type Verbose ¶ added in v1.5.1
type Verbose interface { Info(args ...interface{}) Infof(format string, args ...interface{}) Infoln(args ...interface{}) }
type ZapLogger ¶ added in v1.4.0
type ZapLogger struct { Json bool Level *zapapi.AtomicLevel Base *zapapi.Logger Logger *zapapi.SugaredLogger LevelEncoder zapcore.LevelEncoder TimeEncoder zapcore.TimeEncoder StackTraceLevel *zap.AtomicLevel }
func GetZapLogger ¶ added in v1.4.0
func GetZapLogger() *ZapLogger
func (ZapLogger) GetEncoder ¶ added in v1.4.0
func (ZapLogger) GetEncoderConfig ¶ added in v1.4.0
func (logger ZapLogger) GetEncoderConfig() zapcore.EncoderConfig
func (ZapLogger) GetLevel ¶ added in v1.4.0
func (logger ZapLogger) GetLevel() *zapapi.AtomicLevel
func (ZapLogger) IsDebugEnabled ¶ added in v1.4.0
func (ZapLogger) IsTraceEnabled ¶ added in v1.4.0
func (ZapLogger) SetLogLevel ¶ added in v1.4.0
func (ZapLogger) WithValues ¶ added in v1.4.2
Click to show internal directories.
Click to hide internal directories.