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 LogLevel)
- 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 LogLevel
- type Logger
Constants ¶
View Source
const ( // DebugLevel logs are typically voluminous, and are usually disabled in // production. DebugLevel = LogLevel(zapcore.DebugLevel) // InfoLevel is the default logging priority. InfoLevel = LogLevel(zapcore.InfoLevel) // WarnLevel logs are more important than Info, but don't need individual // human review. WarnLevel = LogLevel(zapcore.WarnLevel) // ErrorLevel logs are high-priority. If an application is running smoothly, // it shouldn't generate any error-level logs. ErrorLevel = LogLevel(zapcore.ErrorLevel) // PanicLevel logs a message, then panics. PanicLevel = LogLevel(zapcore.PanicLevel) // FatalLevel logs a message, then calls os.Exit(1). FatalLevel = LogLevel(zapcore.FatalLevel) )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LogLevel ¶
type LogLevel int8
LogLevel represents the level of logging.
func (*LogLevel) UnmarshalText ¶
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.