Documentation ¶
Index ¶
Constants ¶
View Source
const ( ModDev = iota ModProd )
View Source
const ( FormatJSON = iota FormatConsole )
View Source
const ( // DebugLevel logs are typically voluminous, and are usually disabled in // production. DebugLevel = zapcore.DebugLevel // InfoLevel is the default logging priority. InfoLevel = zapcore.InfoLevel // WarnLevel logs are more important than Info, but don't need individual // human review. WarnLevel = zapcore.WarnLevel // ErrorLevel logs are high-priority. If an application is running smoothly, // it shouldn't generate any error-level logs. ErrorLevel = zapcore.ErrorLevel // DPanicLevel logs are particularly important errors. In development the // logger panics after writing the message. DPanicLevel = zapcore.DPanicLevel // PanicLevel logs a message, then panics. PanicLevel = zapcore.PanicLevel // FatalLevel logs a message, then calls os.Exit(1). FatalLevel = zapcore.FatalLevel )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface { // Info writes a information message. Info(args ...interface{}) // Infof writes a formatted information message. Infof(template string, args ...interface{}) // Infow writes a formatted information message with key-value pairs. Infow(template string, args ...interface{}) // Warn writes a warning message. Warn(args ...interface{}) // Warnf writes a formatted warning message. Warnf(template string, args ...interface{}) // Warnw writes a formatted information message with key-value pairs. Warnw(template string, args ...interface{}) // Error writes an error message. Error(args ...interface{}) // Errorf writes a formatted error message. Errorf(template string, args ...interface{}) // Errorw writes a formatted information message with key-value pairs. Errorw(template string, args ...interface{}) // Debug writes a debug message. Debug(args ...interface{}) // Debugf writes a formatted debug message. Debugf(template string, args ...interface{}) // Debugw writes a formatted information message with key-value pairs. Debugw(template string, args ...interface{}) // Fatal writes a fatal message. Fatal(args ...interface{}) // Fatalf writes a formatted fatal message. Fatalf(template string, args ...interface{}) // With add fields to be used for all logs. With(fields ...interface{}) Logger // Flush any buffered log entries. Flush() error }
Logger common logger interface.
Click to show internal directories.
Click to hide internal directories.