Documentation ¶
Index ¶
- type ILogger
- type Logger
- func (l Logger) Debug(mgs string)
- func (l Logger) Debugf(format string, args ...interface{})
- func (l Logger) Debugw(mgs string, keysAndValues ...interface{})
- func (logger Logger) EchoLogger() echo.MiddlewareFunc
- func (logger Logger) EchoRecover() echo.MiddlewareFunc
- func (l Logger) Error(mgs string)
- func (l Logger) Errorf(format string, args ...interface{})
- func (l Logger) Errorw(mgs string, keysAndValues ...interface{})
- func (l Logger) Fatal(mgs string)
- func (l Logger) Fatalf(format string, args ...interface{})
- func (l Logger) Fatalw(mgs string, keysAndValues ...interface{})
- func (l Logger) GetEchoLogFormat() string
- func (l Logger) Info(mgs string)
- func (l Logger) Infof(format string, args ...interface{})
- func (l Logger) Infow(mgs string, keysAndValues ...interface{})
- func (l Logger) Panic(mgs string)
- func (l Logger) Panicf(format string, args ...interface{})
- func (l Logger) Panicw(mgs string, keysAndValues ...interface{})
- func (logger Logger) RecoverWithConfig(config middleware.RecoverConfig) echo.MiddlewareFunc
- func (l Logger) Sync() error
- func (l Logger) Warn(mgs string)
- func (l Logger) Warnf(format string, args ...interface{})
- func (l Logger) Warnw(mgs string, keysAndValues ...interface{})
- func (l Logger) With(fields ...zap.Field) Logger
- type LoggerConfig
- type MockedLoggerImpl
- func (l MockedLoggerImpl) Debug(mgs string)
- func (l MockedLoggerImpl) Debugf(format string, args ...interface{})
- func (l MockedLoggerImpl) Debugw(mgs string, keysAndValues ...interface{})
- func (l MockedLoggerImpl) Error(mgs string)
- func (l MockedLoggerImpl) Errorf(format string, args ...interface{})
- func (l MockedLoggerImpl) Errorw(mgs string, keysAndValues ...interface{})
- func (l MockedLoggerImpl) Fatal(mgs string)
- func (l MockedLoggerImpl) Fatalf(format string, args ...interface{})
- func (l MockedLoggerImpl) Fatalw(mgs string, keysAndValues ...interface{})
- func (l MockedLoggerImpl) Info(mgs string)
- func (l MockedLoggerImpl) Infof(format string, args ...interface{})
- func (l MockedLoggerImpl) Infow(mgs string, keysAndValues ...interface{})
- func (l MockedLoggerImpl) Panic(mgs string)
- func (l MockedLoggerImpl) Panicf(format string, args ...interface{})
- func (l MockedLoggerImpl) Panicw(mgs string, keysAndValues ...interface{})
- func (l MockedLoggerImpl) Warn(mgs string)
- func (l MockedLoggerImpl) Warnf(format string, args ...interface{})
- func (l MockedLoggerImpl) Warnw(mgs string, keysAndValues ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ILogger ¶
type ILogger interface { Debug(mgs string) Info(mgs string) Warn(mgs string) Error(mgs string) Fatal(mgs string) Panic(mgs string) Debugf(format string, args ...interface{}) Infof(format string, args ...interface{}) Warnf(format string, args ...interface{}) Errorf(format string, args ...interface{}) Fatalf(format string, args ...interface{}) Panicf(format string, args ...interface{}) Debugw(mgs string, keysAndValues ...interface{}) Infow(mgs string, keysAndValues ...interface{}) Warnw(mgs string, keysAndValues ...interface{}) Errorw(mgs string, keysAndValues ...interface{}) Fatalw(mgs string, keysAndValues ...interface{}) Panicw(mgs string, keysAndValues ...interface{}) }
ILogger interface
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (Logger) EchoLogger ¶
func (logger Logger) EchoLogger() echo.MiddlewareFunc
EchoLogger returns a middleware that logs HTTP requests.
func (Logger) EchoRecover ¶
func (logger Logger) EchoRecover() echo.MiddlewareFunc
EchoRecover returns a middleware which recovers from panics anywhere in the chain and handles the control to the centralized HTTPErrorHandler.
func (Logger) GetEchoLogFormat ¶
GetEchoLogFormat - get echo log format
func (Logger) RecoverWithConfig ¶
func (logger Logger) RecoverWithConfig(config middleware.RecoverConfig) echo.MiddlewareFunc
RecoverWithConfig returns a Recover middleware with config. See: `Recover()`.
func (Logger) Sync ¶
Sync calls the underlying Core's Sync method, flushing any buffered log entries. Applications should take care to call Sync before exiting.
type LoggerConfig ¶
type LoggerConfig struct { // Skipper defines a function to skip middleware. Skipper middleware.Skipper // contains filtered or unexported fields }
LoggerConfig defines the config for Logger middleware.
type MockedLoggerImpl ¶
type MockedLoggerImpl struct { }
MockedLoggerImpl - mock for logger
func (MockedLoggerImpl) Debug ¶
func (l MockedLoggerImpl) Debug(mgs string)
Debug - implement from Ilogger
func (MockedLoggerImpl) Debugf ¶
func (l MockedLoggerImpl) Debugf(format string, args ...interface{})
Debugf - implement from Ilogger
func (MockedLoggerImpl) Debugw ¶
func (l MockedLoggerImpl) Debugw(mgs string, keysAndValues ...interface{})
Debugw - implement from Ilogger
func (MockedLoggerImpl) Error ¶
func (l MockedLoggerImpl) Error(mgs string)
Error - implement from Ilogger
func (MockedLoggerImpl) Errorf ¶
func (l MockedLoggerImpl) Errorf(format string, args ...interface{})
Errorf - implement from Ilogger
func (MockedLoggerImpl) Errorw ¶
func (l MockedLoggerImpl) Errorw(mgs string, keysAndValues ...interface{})
Errorw - implement from Ilogger
func (MockedLoggerImpl) Fatal ¶
func (l MockedLoggerImpl) Fatal(mgs string)
Fatal - implement from Ilogger
func (MockedLoggerImpl) Fatalf ¶
func (l MockedLoggerImpl) Fatalf(format string, args ...interface{})
Fatalf - implement from Ilogger
func (MockedLoggerImpl) Fatalw ¶
func (l MockedLoggerImpl) Fatalw(mgs string, keysAndValues ...interface{})
Fatalw - implement from Ilogger
func (MockedLoggerImpl) Info ¶
func (l MockedLoggerImpl) Info(mgs string)
Info - implement from Ilogger
func (MockedLoggerImpl) Infof ¶
func (l MockedLoggerImpl) Infof(format string, args ...interface{})
Infof - implement from Ilogger
func (MockedLoggerImpl) Infow ¶
func (l MockedLoggerImpl) Infow(mgs string, keysAndValues ...interface{})
Infow - implement from Ilogger
func (MockedLoggerImpl) Panic ¶
func (l MockedLoggerImpl) Panic(mgs string)
Panic - implement from Ilogger
func (MockedLoggerImpl) Panicf ¶
func (l MockedLoggerImpl) Panicf(format string, args ...interface{})
Panicf - implement from Ilogger
func (MockedLoggerImpl) Panicw ¶
func (l MockedLoggerImpl) Panicw(mgs string, keysAndValues ...interface{})
Panicw - implement from Ilogger
func (MockedLoggerImpl) Warn ¶
func (l MockedLoggerImpl) Warn(mgs string)
Warn - implement from Ilogger
func (MockedLoggerImpl) Warnf ¶
func (l MockedLoggerImpl) Warnf(format string, args ...interface{})
Warnf - implement from Ilogger
func (MockedLoggerImpl) Warnw ¶
func (l MockedLoggerImpl) Warnw(mgs string, keysAndValues ...interface{})
Warnw - implement from Ilogger