Documentation ¶
Index ¶
- func Debug(msg ...interface{})
- func Debugf(format string, v ...interface{})
- func Debugw(msg string, keysAndValues ...interface{})
- func Error(msg ...interface{})
- func Errorf(format string, v ...interface{})
- func Errorw(msg string, keysAndValues ...interface{})
- func Fatal(msg ...interface{})
- func Fatalf(format string, v ...interface{})
- func Fatalw(msg string, keysAndValues ...interface{})
- func Info(msg ...interface{})
- func Infof(format string, v ...interface{})
- func Infow(msg string, keysAndValues ...interface{})
- func Init(opts *Options)
- func Panic(msg ...interface{})
- func Panicf(format string, v ...interface{})
- func Panicw(msg string, keysAndValues ...interface{})
- func Sync()
- func Warn(msg ...interface{})
- func Warnf(format string, v ...interface{})
- func Warnw(msg string, keysAndValues ...interface{})
- type KLogger
- func (k *KLogger) Debug(msg ...interface{})
- func (k *KLogger) Debugf(format string, v ...interface{})
- func (k *KLogger) Debugw(msg string, keysAndValues ...interface{})
- func (k *KLogger) Error(msg ...interface{})
- func (k *KLogger) Errorf(format string, v ...interface{})
- func (k *KLogger) Errorw(msg string, keysAndValues ...interface{})
- func (k *KLogger) Fatal(msg ...interface{})
- func (k *KLogger) Fatalf(format string, v ...interface{})
- func (k *KLogger) Fatalw(msg string, keysAndValues ...interface{})
- func (k *KLogger) Info(msg ...interface{})
- func (k *KLogger) Infof(format string, v ...interface{})
- func (k *KLogger) Infow(msg string, keysAndValues ...interface{})
- func (k *KLogger) Panic(msg ...interface{})
- func (k *KLogger) Panicf(format string, v ...interface{})
- func (k *KLogger) Panicw(msg string, keysAndValues ...interface{})
- func (k *KLogger) Sync()
- func (k *KLogger) Warn(msg ...interface{})
- func (k *KLogger) Warnf(format string, v ...interface{})
- func (k *KLogger) Warnw(msg string, keysAndValues ...interface{})
- type Logger
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type KLogger ¶
type KLogger struct {
// contains filtered or unexported fields
}
KLogger is a wrapper around zap.SugaredLogger that implements the Logger interface.
type Logger ¶
type Logger interface { Debug(msg ...interface{}) Info(msg ...interface{}) Warn(msg ...interface{}) Error(msg ...interface{}) Panic(msg ...interface{}) Fatal(msg ...interface{}) Debugf(format string, v ...interface{}) Infof(format string, v ...interface{}) Warnf(format string, v ...interface{}) Errorf(format string, v ...interface{}) Panicf(format string, v ...interface{}) Fatalf(format string, v ...interface{}) Debugw(msg string, keysAndValues ...interface{}) Infow(msg string, keysAndValues ...interface{}) Warnw(msg string, keysAndValues ...interface{}) Errorw(msg string, keysAndValues ...interface{}) Panicw(msg string, keysAndValues ...interface{}) Fatalw(msg string, keysAndValues ...interface{}) Sync() }
Logger is a wrapper around zap.Logger that implements the Logger interface.
type Options ¶
type Options struct { // DisableCaller option to disable the caller information. DisableCaller bool // DisableStacktrace option to disable the stacktrace information. DisableStacktrace bool // DisableLevel option to disable the level information. DisableLevel bool // Level option to set the log level. Level string // Format option to set the log format. // format can be "json" or "console". Format string // OutputPaths option to set the log output paths. // output paths can be a file path or a directory path. OutputPaths []string }
Options defines the configuration for the logger.
func NewOptions ¶
func NewOptions() *Options
NewOptions returns a new Options instance with default values.
Click to show internal directories.
Click to hide internal directories.