Documentation ¶
Index ¶
- Constants
- func Debug(v ...interface{})
- func Debugf(format string, v ...interface{})
- func Error(v ...interface{})
- func Errorf(format string, v ...interface{})
- func Fatal(v ...interface{})
- func Fatalf(format string, v ...interface{})
- func Info(v ...interface{})
- func Infof(format string, v ...interface{})
- func Init(logPath string, level Level)
- func Panic(v ...interface{})
- func Panicf(format string, v ...interface{})
- func SetLogger(logger Logger)
- func Warn(v ...interface{})
- func Warnf(format string, v ...interface{})
- type Level
- type Logger
Constants ¶
View Source
const ( // DebugLevel logs are typically voluminous, and are usually disabled in // production. DebugLevel = Level(zapcore.DebugLevel) // InfoLevel is the default logging priority. InfoLevel = Level(zapcore.InfoLevel) // WarnLevel logs are more important than Info, but don't need individual // human review. WarnLevel = Level(zapcore.WarnLevel) // ErrorLevel logs are high-priority. If an application is running smoothly, // it shouldn't generate any error-level logs. ErrorLevel = Level(zapcore.ErrorLevel) // PanicLevel logs a message, then panics. PanicLevel = Level(zapcore.PanicLevel) // FatalLevel logs a message, then calls os.Exit(1). FatalLevel = Level(zapcore.FatalLevel) )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶
type Logger interface { Debug(v ...interface{}) Debugf(format string, v ...interface{}) Info(v ...interface{}) Infof(format string, v ...interface{}) Warn(v ...interface{}) Warnf(format string, v ...interface{}) Error(v ...interface{}) Errorf(format string, v ...interface{}) Panic(v ...interface{}) Panicf(format string, v ...interface{}) Fatal(v ...interface{}) Fatalf(format string, v ...interface{}) }
Click to show internal directories.
Click to hide internal directories.