logger

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LevelDebug = "DEBUG"
	LevelError = "ERROR"
	LevelNone  = "NONE"
)
View Source
const (
	Prefix     = "[mongo-repository]"
	DateFormat = "2006-01-02T15:04:05.000Z07:00"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Clock

type Clock interface {
	Now() time.Time
}

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func New

func New() Logger

func (Logger) Colored

func (l Logger) Colored() Logger

func (Logger) Debugf

func (l Logger) Debugf(action, message string, args ...any)

func (Logger) Errorf

func (l Logger) Errorf(err error, action, message string, args ...any)

func (Logger) IsColored

func (l Logger) IsColored() bool

func (Logger) SetClock

func (l Logger) SetClock(clock Clock) Logger

type TestLogger

type TestLogger struct {
	Logger
	// contains filtered or unexported fields
}

func NewTest

func NewTest(t *testing.T) TestLogger

func (TestLogger) GetOutput

func (tl TestLogger) GetOutput() string

func (TestLogger) SetClock

func (tl TestLogger) SetClock(clock Clock) TestLogger

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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