Documentation ¶
Index ¶
- Variables
- type Level
- type Logger
- type Zlog
- func (z Zlog) Debug(v ...interface{})
- func (z Zlog) Debugf(format string, v ...interface{})
- func (z Zlog) Error(v ...interface{})
- func (z Zlog) Errorf(format string, v ...interface{})
- func (z Zlog) Fatal(v ...interface{})
- func (z Zlog) Fatalf(format string, v ...interface{})
- func (z Zlog) Info(args ...interface{})
- func (z Zlog) Infof(format string, v ...interface{})
- func (z Zlog) Panic(v ...interface{})
- func (z Zlog) Panicf(format string, v ...interface{})
- func (z Zlog) Warn(v ...interface{})
- func (z Zlog) Warnf(format string, v ...interface{})
Constants ¶
This section is empty.
Variables ¶
View Source
var Log = NewZerologLoggerWithLevel(DebugLevel)
Functions ¶
This section is empty.
Types ¶
type Level ¶
type Level int
A Level is a logging priority. Higher levels are more important. This is here as a convenience when using the various log options.
const ( // DebugLevel logs are typically voluminous, // and are usually disabled in production. DebugLevel Level = iota - 1 // InfoLevel is the default logging priority. InfoLevel // WarnLevel logs are more important than Info, // but don't need individual human review. WarnLevel // ErrorLevel logs are high-priority. If an application runs // smoothly, it shouldn't generate any error-level logs. ErrorLevel // PanicLevel logs a message, then panics. PanicLevel // FatalLevel logs a message, then calls os.Exit(1). FatalLevel )
type Logger ¶
type Logger interface { // Debug logs args when the logger level is debug. Debug(v ...interface{}) // Debugf formats args and logs the result when the logger level is debug. Debugf(format string, v ...interface{}) // Info logs args when the logger level is info. Info(args ...interface{}) // Infof formats args and logs the result when the logger level is info. Infof(format string, v ...interface{}) // Warn logs args when the logger level is warn. Warn(v ...interface{}) // Warnf formats args and logs the result when the logger level is warn. Warnf(format string, v ...interface{}) // Error logs args when the logger level is error. Error(v ...interface{}) // Errorf formats args and logs the result when the logger level is debug. Errorf(format string, v ...interface{}) // Panic logs args on panic. Panic(v ...interface{}) // Panicf formats args and logs the result on panic. Panicf(format string, v ...interface{}) // Fatal logs args when the error is fatal. Fatal(v ...interface{}) // Fatalf formats args and logs the result when the error is fatal. Fatalf(format string, v ...interface{}) }
Logger is a generic logger interface.
type Zlog ¶
type Zlog struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.