Documentation ¶
Index ¶
- func HideKey(key string) string
- func HideMongoSecret(mongoUri string) string
- type Logger
- type LoggerMock
- func (l *LoggerMock) AssertLog(t *testing.T, level zapcore.Level, msg string)
- func (l *LoggerMock) Debug(msg string, fields ...zap.Field)
- func (l *LoggerMock) Error(msg string, fields ...zap.Field)
- func (l *LoggerMock) Fatal(msg string, fields ...zap.Field)
- func (l *LoggerMock) Info(msg string, fields ...zap.Field)
- func (l *LoggerMock) Log(lvl zapcore.Level, msg string, fields ...zap.Field)
- func (l *LoggerMock) Warn(msg string, fields ...zap.Field)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HideMongoSecret ¶
HideMongoSecret removes the password in the mongo URI
Types ¶
type Logger ¶
type Logger interface { Debug(msg string, fields ...zap.Field) Info(msg string, fields ...zap.Field) Warn(msg string, fields ...zap.Field) Error(msg string, fields ...zap.Field) Fatal(msg string, fields ...zap.Field) }
Logger is a logger that can be used to log messages. Deprecated: use https://pkg.go.dev/go.uber.org/zap@v1.24.0/zap instead.
type LoggerMock ¶
type LoggerMock struct {
// contains filtered or unexported fields
}
LoggerMock is a mock logger that can be used to assert that logs were called. Deprecated: use https://pkg.go.dev/go.uber.org/zap@v1.24.0/zaptest/observer instead.
func (*LoggerMock) AssertLog ¶
AssertLog asserts that the logger was called with the given log level, message and fields.
func (*LoggerMock) Debug ¶ added in v0.18.0
func (l *LoggerMock) Debug(msg string, fields ...zap.Field)
Click to show internal directories.
Click to hide internal directories.