Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Adapter ¶ added in v0.1.6
type Adapter struct {
// contains filtered or unexported fields
}
Adapter adapts the Mu logger to the standard library logger.
type Logger ¶
type Logger interface { // Level returns the logging level. Level() Level // SetLevel sets the logging level. SetLevel(level Level) // DPanic logs a panic message and panics in development mode. DPanic(args ...interface{}) // DPanicf logs a panic message with formatting and panics in development mode. DPanicf(template string, args ...interface{}) // DPanicln logs a panic message with a newline and panics in development mode. DPanicln(args ...interface{}) // DPanicw logs a panic message with key-value pairs and panics in development mode. DPanicw(msg string, keysAndValues ...interface{}) // Debug logs a debug message. Debug(args ...interface{}) // Debugf logs a debug message with formatting. Debugf(template string, args ...interface{}) // Debugln logs a debug message with a newline. Debugln(args ...interface{}) // Debugw logs a debug message with key-value pairs. Debugw(msg string, keysAndValues ...interface{}) // Error logs an error message. Error(args ...interface{}) // Errorf logs an error message with formatting. Errorf(template string, args ...interface{}) // Errorln logs an error message with a newline. Errorln(args ...interface{}) // Errorw logs an error message with key-value pairs. Errorw(msg string, keysAndValues ...interface{}) // Fatal logs a fatal message. Fatal(args ...interface{}) // Fatalf logs a fatal message with formatting. Fatalf(template string, args ...interface{}) // Fatalln logs a fatal message with a newline. Fatalln(args ...interface{}) // Fatalw logs a fatal message with key-value pairs. Fatalw(msg string, keysAndValues ...interface{}) // Info logs an info message. Info(args ...interface{}) // Infof logs an info message with formatting. Infof(template string, args ...interface{}) // Infoln logs an info message with a newline. Infoln(args ...interface{}) // Infow logs an info message with key-value pairs. Infow(msg string, keysAndValues ...interface{}) // Panic logs a panic message. Panic(args ...interface{}) // Panicf logs a panic message with formatting. Panicf(template string, args ...interface{}) // Panicln logs a panic message with a newline. Panicln(args ...interface{}) // Panicw logs a panic message with key-value pairs. Panicw(msg string, keysAndValues ...interface{}) // Sync flushes the logger. Sync() error // Warn logs a warning message. Warn(args ...interface{}) // Warnf logs a warning message with formatting. Warnf(template string, args ...interface{}) // Warnln logs a warning message with a newline. Warnln(args ...interface{}) // Warnw logs a warning message with key-value pairs. Warnw(msg string, keysAndValues ...interface{}) // With creates a child logger and adds structured context to it. With(args ...interface{}) Logger }
Logger is the interface for logging.
func NewZapLogger ¶
NewZapLogger creates a new zap logger.
Click to show internal directories.
Click to hide internal directories.