v1.14.0 Latest Latest

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

Go to latest
Published: Aug 12, 2021 License: MIT Imports: 3 Imported by: 0




This section is empty.


This section is empty.


func DefaultLogger added in v1.14.0

func DefaultLogger(w io.Writer) fxevent.Logger

DefaultLogger constructs a Logger out of io.Writer.


type Events added in v1.14.0

type Events []fxevent.Event

Events is a list of events captured by fxlog.Spy.

func (Events) Len added in v1.14.0

func (es Events) Len() int

Len returns the number of events in this list.

func (Events) SelectByTypeName added in v1.14.0

func (es Events) SelectByTypeName(name string) Events

SelectByTypeName returns a new list with only events matching the specified type.

type Spy added in v1.11.0

type Spy struct {
	// contains filtered or unexported fields

Spy is an Fx event logger that captures emitted events and/or logged statements. It may be used in tests of Fx logs.

func (*Spy) EventTypes added in v1.14.0

func (s *Spy) EventTypes() []string

EventTypes returns all captured event types.

func (*Spy) Events added in v1.14.0

func (s *Spy) Events() Events

Events returns all captured events.

func (*Spy) LogEvent added in v1.14.0

func (s *Spy) LogEvent(event fxevent.Event)

LogEvent appends an Event.

func (*Spy) Reset added in v1.11.0

func (s *Spy) Reset()

Reset clears all messages and events from the Spy.


Path Synopsis

Jump to

Keyboard shortcuts

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