Documentation ¶
Index ¶
- Constants
- Variables
- func DPanic(args ...interface{})
- func DPanicf(template string, args ...interface{})
- func DPanicw(msg string, keysAndValues ...interface{})
- func Debug(args ...interface{})
- func Debugf(template 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(template string, args ...interface{})
- func Infow(msg string, keysAndValues ...interface{})
- func Init()
- func InitLogger(cfg *TLoggerConfig)
- func NewEncoderConfig() zapcore.EncoderConfig
- func Panic(args ...interface{})
- func Panicf(templete string, args ...interface{})
- func Panicw(msg string, keysAndValues ...interface{})
- func SetLevel(l zapcore.Level)
- func SetTarget(ta string)
- func TimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)
- func Warn(args ...interface{})
- func Warnf(template string, args ...interface{})
- func Warnw(msg string, keysAndValues ...interface{})
- type ILogger
- type TLoggerConfig
Constants ¶
View Source
const ( Console = "console" File = "file" )
Variables ¶
View Source
var ( Logger *zap.Logger Sugar *zap.SugaredLogger )
Functions ¶
func InitLogger ¶
func InitLogger(cfg *TLoggerConfig)
func NewEncoderConfig ¶
func NewEncoderConfig() zapcore.EncoderConfig
func TimeEncoder ¶
func TimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)
Types ¶
type ILogger ¶
type ILogger interface { Debug(args ...interface{}) Debugf(template string, args ...interface{}) Debugw(msg string, keysAndValues ...interface{}) Info(args ...interface{}) Infof(template string, args ...interface{}) Infow(msg string, keysAndValues ...interface{}) Warn(args ...interface{}) Warnf(template string, args ...interface{}) Warnw(msg string, keysAndValues ...interface{}) Error(args ...interface{}) Errorf(template string, args ...interface{}) Errorw(msg string, keysAndValues ...interface{}) DPanic(args ...interface{}) DPanicf(template string, args ...interface{}) DPanicw(msg string, keysAndValues ...interface{}) Panic(args ...interface{}) Panicf(msg string, args ...interface{}) Panicw(msg string, keysAndValues ...interface{}) }
Click to show internal directories.
Click to hide internal directories.