testutil

package
v4.44.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockLog

type MockLog struct {
	Traces        []string
	Debugs        []string
	Infos         []string
	Warns         []string
	Errors        []string
	Fields        []map[string]string
	MappingFields []any
}

MockLog is a mock log.Modular implementation.

func (*MockLog) Debug

func (m *MockLog) Debug(format string, v ...any)

Debug logs a debug message with a given format.

func (*MockLog) Debugln

func (m *MockLog) Debugln(message string)

Debugln logs a debug message.

func (*MockLog) Error

func (m *MockLog) Error(format string, v ...any)

Error logs an error message with a given format.

func (*MockLog) Errorln

func (m *MockLog) Errorln(message string)

Errorln logs an error message.

func (*MockLog) Fatal

func (m *MockLog) Fatal(format string, v ...any)

Fatal logs a fatal error message with a given format.

func (*MockLog) Fatalln

func (m *MockLog) Fatalln(message string)

Fatalln logs a fatal error message.

func (*MockLog) Info

func (m *MockLog) Info(format string, v ...any)

Info logs an info message with a given format.

func (*MockLog) Infoln

func (m *MockLog) Infoln(message string)

Infoln logs an info message.

func (*MockLog) Trace

func (m *MockLog) Trace(format string, v ...any)

Trace logs a trace message with a given format.

func (*MockLog) Traceln

func (m *MockLog) Traceln(message string)

Traceln logs a trace message.

func (*MockLog) Warn

func (m *MockLog) Warn(format string, v ...any)

Warn logs a warning message with a given format.

func (*MockLog) Warnln

func (m *MockLog) Warnln(message string)

Warnln logs a warning message.

func (*MockLog) With

func (m *MockLog) With(args ...any) log.Modular

With adds mapping fields to the MockLog message.

func (*MockLog) WithFields

func (m *MockLog) WithFields(fields map[string]string) log.Modular

WithFields adds fields to the MockLog message.

Jump to

Keyboard shortcuts

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