Documentation
¶
Index ¶
- func Error(args ...interface{})
- func ErrorDepth(depth int, args ...interface{})
- func Errorf(format string, args ...interface{})
- func Errorln(args ...interface{})
- func Exit(args ...interface{})
- func ExitDepth(depth int, args ...interface{})
- func Exitf(format string, args ...interface{})
- func Exitln(args ...interface{})
- func Fatal(args ...interface{})
- func FatalDepth(depth int, args ...interface{})
- func Fatalf(format string, args ...interface{})
- func Fatalln(args ...interface{})
- func Flush()
- func Info(args ...interface{})
- func InfoDepth(depth int, args ...interface{})
- func Infof(format string, args ...interface{})
- func Infoln(args ...interface{})
- func InitFlags(flagset *pflag.FlagSet)
- func SetLevel(v Level)
- func Warning(args ...interface{})
- func WarningDepth(depth int, args ...interface{})
- func Warningf(format string, args ...interface{})
- func Warningln(args ...interface{})
- type Config
- type Klogger
- func (k *Klogger) Error(args ...interface{})
- func (k *Klogger) ErrorDepth(depth int, args ...interface{})
- func (k *Klogger) Errorf(format string, args ...interface{})
- func (k *Klogger) Errorln(args ...interface{})
- func (k *Klogger) Exit(args ...interface{})
- func (k *Klogger) ExitDepth(depth int, args ...interface{})
- func (k *Klogger) Exitf(format string, args ...interface{})
- func (k *Klogger) Exitln(args ...interface{})
- func (k *Klogger) Fatal(args ...interface{})
- func (k *Klogger) FatalDepth(depth int, args ...interface{})
- func (k *Klogger) Fatalf(format string, args ...interface{})
- func (k *Klogger) Fatalln(args ...interface{})
- func (k *Klogger) Info(args ...interface{})
- func (k *Klogger) InfoDepth(depth int, args ...interface{})
- func (k *Klogger) Infof(format string, args ...interface{})
- func (k *Klogger) Infoln(args ...interface{})
- func (k *Klogger) SetLevel(v Level)
- func (k *Klogger) V(level Level) Verbose
- func (k *Klogger) Warning(args ...interface{})
- func (k *Klogger) WarningDepth(depth int, args ...interface{})
- func (k *Klogger) Warningf(format string, args ...interface{})
- func (k *Klogger) Warningln(args ...interface{})
- func (k *Klogger) With(args ...interface{}) *Klogger
- func (k *Klogger) WithAll(args ...interface{}) *Klogger
- func (k *Klogger) WithFields(args ...interface{}) *Klogger
- type Level
- type Verbose
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config is the mixture of zap config and klog config
type Klogger ¶
type Klogger struct {
// contains filtered or unexported fields
}
Klogger wraps a sugarlogger
func With ¶
func With(args ...interface{}) *Klogger
With fills k-v of a struct into a logger, however it's relatively slow
func WithAll ¶
func WithAll(args ...interface{}) *Klogger
WithAll fills each arg directly without parsing fields and values Only valid for exported fields
func WithFields ¶
func WithFields(args ...interface{}) *Klogger
WithFields requires user to fill in k-v pairs
func (*Klogger) ErrorDepth ¶
ErrorDepth is a shim
func (*Klogger) FatalDepth ¶
FatalDepth is a shim
func (*Klogger) WarningDepth ¶
WarningDepth is a shim
func (*Klogger) With ¶
With fills k-v of a struct into a logger, however it's relatively slow Only struct and map will be accepted:
- struct: only exported field will be added
- map: only accept string type as key
func (*Klogger) WithAll ¶
WithAll fills each arg directly without parsing fields and values Only valid for exported fields
func (*Klogger) WithFields ¶
WithFields requires user to fill in k-v pairs
Click to show internal directories.
Click to hide internal directories.