Documentation ¶
Index ¶
- Variables
- func DPanic(args ...interface{})
- func DPanicf(template string, args ...interface{})
- func DPanicw(msg string, keysAndValues ...interface{})
- func Debug(args ...interface{})
- func Debugf(format 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 Info(args ...interface{})
- func Infof(format string, args ...interface{})
- func Infow(msg string, keysAndValues ...interface{})
- func Init(path string) error
- func InitType(path, cfgType string) error
- func Panic(args ...interface{})
- func Panicf(template string, args ...interface{})
- func Panicw(msg string, keysAndValues ...interface{})
- func Sync() error
- func Warn(args ...interface{})
- func Warnf(template string, args ...interface{})
- func Warnw(msg string, keysAndValues ...interface{})
- type LoggerGlobal
- type ZapLogger
Constants ¶
This section is empty.
Variables ¶
var Sugared *zap.SugaredLogger
var Wrapper *zap.Logger
Functions ¶
func DPanic ¶
func DPanic(args ...interface{})
Deprecated DPanic uses fmt.Sprint to construct and log a message. In development, the logger then panics. (See zapcore.DPanicLevel for details.)
func DPanicf ¶
func DPanicf(template string, args ...interface{})
Deprecated DPanicf uses fmt.Sprintf to log a templated message. In development, the logger then panics. (See zapcore.DPanicLevel for details.)
func DPanicw ¶
func DPanicw(msg string, keysAndValues ...interface{})
Deprecated DPanicw logs a message with some additional context. In development, the logger then panics. (See DPanicLevel for details.) The variadic key-value pairs are treated as they are in With.
func Debug ¶
func Debug(args ...interface{})
Deprecated Debug uses fmt.Sprint to construct and log a message.
func Debugf ¶
func Debugf(format string, args ...interface{})
Deprecated Debugf uses fmt.Sprintf to log a templated message.
func Debugw ¶
func Debugw(msg string, keysAndValues ...interface{})
Deprecated Debugw logs a message with some additional context. The variadic key-value pairs are treated as they are in With.
When debug-level logging is disabled, this is much faster than
s.With(keysAndValues).Debug(msg)
func Error ¶
func Error(args ...interface{})
Deprecated Error uses fmt.Sprint to construct and log a message.
func Errorf ¶
func Errorf(template string, args ...interface{})
Deprecated Errorf uses fmt.Sprintf to log a templated message.
func Errorw ¶
func Errorw(msg string, keysAndValues ...interface{})
Deprecated Errorw logs a message with some additional context. The variadic key-value pairs are treated as they are in With.
func Fatal ¶
func Fatal(args ...interface{})
Deprecated Fatal uses fmt.Sprint to construct and log a message, then calls os.Exit.
func Fatalf ¶
func Fatalf(template string, args ...interface{})
Deprecated Fatalf uses fmt.Sprintf to log a templated message, then calls os.Exit.
func Fatalw ¶
func Fatalw(msg string, keysAndValues ...interface{})
Deprecated Fatalw logs a message with some additional context, then calls os.Exit. The variadic key-value pairs are treated as they are in With.
func Info ¶
func Info(args ...interface{})
Deprecated Info uses fmt.Sprint to construct and log a message.
func Infof ¶
func Infof(format string, args ...interface{})
Deprecated Infof uses fmt.Sprintf to log a templated message.
func Infow ¶
func Infow(msg string, keysAndValues ...interface{})
Deprecated Infow logs a message with some additional context. The variadic key-value pairs are treated as they are in With.
func InitType ¶
read default type is json if path is empty read default config path: conf/config.yaml
func Panic ¶
func Panic(args ...interface{})
Deprecated Panic uses fmt.Sprint to construct and log a message, then panics.
func Panicf ¶
func Panicf(template string, args ...interface{})
Deprecated Panicf uses fmt.Sprintf to log a templated message, then panics.
func Panicw ¶
func Panicw(msg string, keysAndValues ...interface{})
Deprecated Panicw logs a message with some additional context, then panics. The variadic key-value pairs are treated as they are in With.
func Warn ¶
func Warn(args ...interface{})
Deprecated Warn uses fmt.Sprint to construct and log a message.
Types ¶
type LoggerGlobal ¶
type LoggerGlobal interface { Debug(args ...interface{}) Info(args ...interface{}) Warn(args ...interface{}) Error(args ...interface{}) DPanic(args ...interface{}) Panic(args ...interface{}) Fatal(args ...interface{}) Debugf(format string, args ...interface{}) Infof(format string, args ...interface{}) Warnf(template string, args ...interface{}) Errorf(template string, args ...interface{}) DPanicf(template string, args ...interface{}) Panicf(template string, args ...interface{}) Fatalf(template string, args ...interface{}) Debugw(msg string, keysAndValues ...interface{}) Infow(msg string, keysAndValues ...interface{}) Warnw(msg string, keysAndValues ...interface{}) Errorw(msg string, keysAndValues ...interface{}) DPanicw(msg string, keysAndValues ...interface{}) Panicw(msg string, keysAndValues ...interface{}) Fatalw(msg string, keysAndValues ...interface{}) Sync() error }
Logger is a interface
var Logger LoggerGlobal
Logger is the global variable for the object of lager.Logger