Documentation ¶
Overview ¶
Package testlog provides a log handler for unit tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CapturingHandler ¶ added in v1.1.2
CapturingHandler provides a log handler that captures all log records and optionally forwards them to a delegate. Note that it is not thread safe.
func (*CapturingHandler) Clear ¶ added in v1.1.2
func (c *CapturingHandler) Clear()
func (*CapturingHandler) FindLog ¶ added in v1.1.2
func (c *CapturingHandler) FindLog(lvl log.Lvl, msg string) *HelperRecord
type HelperRecord ¶ added in v1.1.2
func (*HelperRecord) GetContextValue ¶ added in v1.1.2
func (h *HelperRecord) GetContextValue(name string) any
Click to show internal directories.
Click to hide internal directories.