Documentation ¶
Index ¶
- func Config(v *viper.Viper)
- func Debug(msg string, fields ...zap.Field)
- func Error(msg string, fields ...zap.Field)
- func Fatal(msg string, fields ...zap.Field)
- func Get() *zap.Logger
- func Info(msg string, fields ...zap.Field)
- func Warn(msg string, fields ...zap.Field)
- type Cfg
- type EchoLogger
- func (t *EchoLogger) Debug(i ...interface{})
- func (t *EchoLogger) Debugf(format string, args ...interface{})
- func (t *EchoLogger) Debugj(j log.JSON)
- func (t *EchoLogger) Error(i ...interface{})
- func (t *EchoLogger) Errorf(format string, args ...interface{})
- func (t *EchoLogger) Errorj(j log.JSON)
- func (t *EchoLogger) Fatal(i ...interface{})
- func (t *EchoLogger) Fatalf(format string, args ...interface{})
- func (t *EchoLogger) Fatalj(j log.JSON)
- func (t *EchoLogger) For(ctx context.Context) *EchoLogger
- func (t *EchoLogger) Info(i ...interface{})
- func (t *EchoLogger) Infof(format string, args ...interface{})
- func (t *EchoLogger) Infoj(j log.JSON)
- func (t *EchoLogger) Level() log.Lvl
- func (t *EchoLogger) Output() io.Writer
- func (t *EchoLogger) Panic(i ...interface{})
- func (t *EchoLogger) Panicf(format string, args ...interface{})
- func (t *EchoLogger) Panicj(j log.JSON)
- func (t *EchoLogger) Prefix() string
- func (t *EchoLogger) Print(i ...interface{})
- func (t *EchoLogger) Printf(format string, args ...interface{})
- func (t *EchoLogger) Printj(j log.JSON)
- func (t *EchoLogger) SetHeader(h string)
- func (t *EchoLogger) SetLevel(v log.Lvl)
- func (t *EchoLogger) SetOutput(w io.Writer)
- func (t *EchoLogger) SetPrefix(p string)
- func (t *EchoLogger) Warn(i ...interface{})
- func (t *EchoLogger) Warnf(format string, args ...interface{})
- func (t *EchoLogger) Warnj(j log.JSON)
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cfg ¶
type Cfg struct { Level string `yaml:"level"` File string `yaml:"file"` Stdout bool `yaml:"stdout"` Format string `yaml:"format"` Caller bool `yaml:"caller"` MaxSize int `yaml:"maxSize"` MaxDays int `yaml:"maxDays"` }
Cfg is the log config
type EchoLogger ¶
type EchoLogger struct {
// contains filtered or unexported fields
}
EchoLogger echo logger see echo.Logger
func (*EchoLogger) Debugf ¶
func (t *EchoLogger) Debugf(format string, args ...interface{})
Debugf log debug formatted message
func (*EchoLogger) Errorf ¶
func (t *EchoLogger) Errorf(format string, args ...interface{})
Errorf log error formatted message
func (*EchoLogger) Fatalf ¶
func (t *EchoLogger) Fatalf(format string, args ...interface{})
Fatalf log formatted message
func (*EchoLogger) For ¶
func (t *EchoLogger) For(ctx context.Context) *EchoLogger
For with context.Context
func (*EchoLogger) Infof ¶
func (t *EchoLogger) Infof(format string, args ...interface{})
Infof log formatted
func (*EchoLogger) Panic ¶
func (t *EchoLogger) Panic(i ...interface{})
Panic log panic message, which will cause panic
func (*EchoLogger) Panicf ¶
func (t *EchoLogger) Panicf(format string, args ...interface{})
Panicf log formatted message, which will cause panic
func (*EchoLogger) Panicj ¶
func (t *EchoLogger) Panicj(j log.JSON)
Panicj log panic json message, which will cause panic
func (*EchoLogger) Printf ¶
func (t *EchoLogger) Printf(format string, args ...interface{})
Printf log formatted
func (*EchoLogger) SetHeader ¶
func (t *EchoLogger) SetHeader(h string)
SetHeader set header, not implemented
func (*EchoLogger) SetOutput ¶
func (t *EchoLogger) SetOutput(w io.Writer)
SetOutput not implemented, ignored
func (*EchoLogger) Warnf ¶
func (t *EchoLogger) Warnf(format string, args ...interface{})
Warnf log warn formatted message
type Logger ¶
type Logger interface { // Named see zap Named Named(name string) Logger // Debug log message Debug(msg string, fields ...zapcore.Field) // Info log message Info(msg string, fields ...zapcore.Field) // Warn log message Warn(msg string, fields ...zapcore.Field) // Error log message Error(msg string, fields ...zapcore.Field) // Fatal log message Fatal(msg string, fields ...zapcore.Field) // With add zap fields With(fields ...zapcore.Field) Logger // For log with context.Context, which will log trace_id and span_id if opentracing enabled For(ctx context.Context) Logger // CallerSkip skip caller for adjust caller CallerSkip(int) Logger }
Logger log interface definition
Click to show internal directories.
Click to hide internal directories.