xlogger

package
v2.5.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HideKey

func HideKey(key string) string

func HideMongoSecret

func HideMongoSecret(mongoUri string) string

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

func (l *LoggerMock) AssertLog(t *testing.T, level zapcore.Level, msg string)

AssertLog asserts that the logger was called with the given log level, message and fields.

func (*LoggerMock) Debug

func (l *LoggerMock) Debug(msg string, fields ...zap.Field)

func (*LoggerMock) Error

func (l *LoggerMock) Error(msg string, fields ...zap.Field)

func (*LoggerMock) Fatal

func (l *LoggerMock) Fatal(msg string, fields ...zap.Field)

func (*LoggerMock) Info

func (l *LoggerMock) Info(msg string, fields ...zap.Field)

func (*LoggerMock) Log

func (l *LoggerMock) Log(lvl zapcore.Level, msg string, fields ...zap.Field)

func (*LoggerMock) Warn

func (l *LoggerMock) Warn(msg string, fields ...zap.Field)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL