Documentation ¶
Index ¶
Constants ¶
View Source
const WithComponent = "component"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Level ¶
type Level int8
A Level is a logging priority. Higher levels are more important.
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 is running smoothly, // it shouldn't generate any error-level logs. ErrorLevel // PanicLevel logs are particularly important errors. In development the // logger panics after writing the message. PanicLevel // FatalLevel logs a message, then calls os.Exit(1). FatalLevel )
type Logger ¶
type Logger interface { Debug(args ...interface{}) Info(args ...interface{}) Warn(args ...interface{}) Error(args ...interface{}) Panic(args ...interface{}) Fatal(args ...interface{}) Debugf(template string, args ...interface{}) //Tracef(string, ...interface{}) Infof(template string, args ...interface{}) Warnf(template string, args ...interface{}) Errorf(template string, args ...interface{}) Panicf(template string, args ...interface{}) Fatalf(template string, args ...interface{}) Debugw(msg string, keysAndValues ...interface{}) Infow(msg string, keysAndValues ...interface{}) Warnw(msg string, keysAndValues ...interface{}) Errorw(msg string, keysAndValues ...interface{}) Panicw(msg string, keysAndValues ...interface{}) Fatalw(msg string, keysAndValues ...interface{}) With(args ...interface{}) Logger WithOptions(opts ...Option) Logger }
func GetNopLogger ¶
func GetNopLogger() Logger
Click to show internal directories.
Click to hide internal directories.