log_options_testing

package
v1.25.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package log_options_testing captures the lines an endpoint logs, through the logger the services log through, for the endpoints' tests of what their audit lines say.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Capture

func Capture(run func()) ([]map[string]any, error)

Capture runs run with the default logger writing JSON lines into memory, and returns the lines written meanwhile. The logger is utils_go's context logger, as the services build it, so that the lines are what a service's would be: same-named groups merged, and an error the context carries written out.

It swaps the process-wide default logger, so call it only from a test that is not parallel, and from subtests that are not either.

func Events

func Events(lines []map[string]any, action string) []map[string]any

Events returns the event groups of the lines whose event.action is action, in order.

Types

This section is empty.

Jump to

Keyboard shortcuts

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