You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For fxevent console implementation: no longer log non-error case for fxevent.Invoke event, while for zap implementation, start logging fx.Invoking case without stack.
Introduce the new fx.WithLogger option. Provide a constructor for fxevent.Logger objects with it to customize how Fx logs events.
Add new fxevent package that exposes events from Fx in a structured way.
Use this to write custom logger implementations for use with the fx.WithLogger option.
Expose and log additional information when lifecycle hooks time out.
Changed
Fx now emits structured JSON logs by default. These may be parsed and
processed by log ingestion systems.
fxtest.Lifecycle now logs to the provided testing.TB instead of stderr.
fx.In and fx.Out are now type aliases instead of structs.
Added fx.ValidateGraph which allows graph cycle validation and dependency correctness
without running anything. This is useful if fx.Invoke has side effects, does I/O, etc.
Value groups can use the flatten option to indicate values in a slice should
be provided individually rather than providing the slice itself. See package
documentation for details.