Documentation ¶
Index ¶
- Constants
- func DPanic(args ...interface{})
- func DPanicf(fmt string, args ...interface{})
- func Debug(args ...interface{})
- func Debugf(fmt string, args ...interface{})
- func Error(args ...interface{})
- func Errorf(fmt string, args ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(fmt string, args ...interface{})
- func Info(args ...interface{})
- func Infof(fmt string, args ...interface{})
- func Panic(args ...interface{})
- func Panicf(fmt string, args ...interface{})
- func SetLogger(options ...Option) (err error)
- func SetLoggerCallerDisable() (err error)
- func Warn(args ...interface{})
- func Warnf(fmt string, args ...interface{})
- type EnvLogger
- type FileLogger
- type Logger
- type Option
- type Options
Constants ¶
View Source
const ( DefaultEnv = LogDevelopEnv DefaultLevel = zapcore.DebugLevel DefaultCallerSkip = 1 )
Variables ¶
This section is empty.
Functions ¶
func SetLoggerCallerDisable ¶
func SetLoggerCallerDisable() (err error)
SetLoggerCallerDisable disable caller info in production env for performance improve. It is highly recommended that you execute this method in a production environment.
Types ¶
type FileLogger ¶
type Logger ¶
type Logger interface { Debug(args ...interface{}) Info(args ...interface{}) Warn(args ...interface{}) Error(args ...interface{}) DPanic(args ...interface{}) Panic(args ...interface{}) Fatal(args ...interface{}) Debugf(fmt string, args ...interface{}) Infof(fmt string, args ...interface{}) Warnf(fmt string, args ...interface{}) Errorf(fmt string, args ...interface{}) DPanicf(fmt string, args ...interface{}) Panicf(fmt string, args ...interface{}) Fatalf(fmt string, args ...interface{}) }
type Option ¶
type Option func(*Options)
func CallerSkip ¶
func FileLog ¶
func FileLog(fileLog *FileLogger) Option
Click to show internal directories.
Click to hide internal directories.