log

package
v0.0.0-...-aff9826 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertAuditPayloads

func AssertAuditPayloads(t *testing.T, h *test.Hook, expected []*audit.Payload)

AssertAuditPayload compares the audit payloads in `h` with the given expected payloads

func AssertLoggingOutput

func AssertLoggingOutput(h *test.Hook, expected []ExpectedLogEntry) error

AssertLoggingOutput compares the logs on `h` with the expected entries in `expected`. It returns a slice of errors encountered, with a zero length if no assertions failed.

func LogForTesting

func LogForTesting(t *testing.T) (*test.Hook, *logrus.Entry)

func New

func New() (*test.Hook, *logrus.Entry)

New creates a logging hook and entry suitable for passing to functions and asserting on.

func NewAudit

func NewAudit() (*test.Hook, *logrus.Entry)

NewAudit creates a logging hook and entry suitable for testing the IFXAudit feature.

func NewOtelAuditClient

func NewOtelAuditClient() audit.Client

Types

type ExpectedLogEntry

type ExpectedLogEntry map[string]types.GomegaMatcher

type MockAudit

type MockAudit struct{}

func (*MockAudit) Send

func (a *MockAudit) Send(ctx context.Context, msg msgs.Msg, options ...base.SendOption) error

Jump to

Keyboard shortcuts

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