Repository: uber-go/fx
Pull request #756 (2021-07-09 17:52:44)

Rename event types and messages with consistent tenses.
Use active voice for events before we execute the events and passive after they are run. Here we also combine similar events to add an optional Err field if said event errored. 

Note, here for backwards compatibility we do not yet change event verbs for previous default console logger. New events will also be added in a followup diff as necessary.

Ref GO-677

codecov[bot]: # [Codecov](https://codecov.io/gh/uber-go/fx/pull/756?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go) Report
> Merging [#756](https://codecov.io/gh/uber-go/fx/pull/756?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go) (c001c45) into [master](https://codecov.io/gh/uber-go/fx/commit/734db16873c487e7f28bd5f08c89190961c5814c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go) (734db16) will **increase** coverage by `0.00%`.
> The diff coverage is `98.48%`.

[![Impacted file tree graph](https://codecov.io/gh/uber-go/fx/pull/756/graphs/tree.svg?width=650&height=150&src=pr&token=PYY9PSfaC6&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go)](https://codecov.io/gh/uber-go/fx/pull/756?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go)

```diff
@@           Coverage Diff           @@
##           master     #756   +/-   ##
=======================================
  Coverage   98.06%   98.06%           
=======================================
  Files          24       24           
  Lines         671      673    +2     
=======================================
+ Hits          658      660    +2     
  Misses         10       10           
  Partials        3        3           
```


| [Impacted Files](https://codecov.io/gh/uber-go/fx/pull/756?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go) | Coverage Δ | |
|---|---|---|
| [log.go](https://codecov.io/gh/uber-go/fx/pull/756/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go#diff-bG9nLmdv) | `71.42% <ø> (ø)` | |
| [app.go](https://codecov.io/gh/uber-go/fx/pull/756/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go#diff-YXBwLmdv) | `96.92% <88.88%> (ø)` | |
| [fxevent/console.go](https://codecov.io/gh/uber-go/fx/pull/756/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go#diff-ZnhldmVudC9jb25zb2xlLmdv) | `100.00% <100.00%> (ø)` | |
| [fxevent/event.go](https://codecov.io/gh/uber-go/fx/pull/756/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go#diff-ZnhldmVudC9ldmVudC5nbw==) | `100.00% <100.00%> (ø)` | |
| [fxevent/zap.go](https://codecov.io/gh/uber-go/fx/pull/756/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go#diff-ZnhldmVudC96YXAuZ28=) | `100.00% <100.00%> (ø)` | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/uber-go/fx/pull/756?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/uber-go/fx/pull/756?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go). Last update [734db16...c001c45](https://codecov.io/gh/uber-go/fx/pull/756?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber-go).


Patch:
diff --git a/app.go b/app.go
index 8152d07..77e6451 100644
--- a/app.go
+++ b/app.go
@@ -562,7 +562,7 @@ func New(opts ...Option) *App {
 	app.provide(provide{Target: app.dotGraph, Stack: frames})
 
 	if app.err != nil {
-		app.log.LogEvent(&fxevent.ProvideError{Err: app.err})
+		app.log.LogEvent(&fxevent.Provide{Err: app.err})
 		// Don't return yet. If a custom logger was being used,
 		// we're still buffering messages. We'll want to flush them to
 		// the logger.
@@ -577,7 +577,7 @@ func New(opts ...Option) *App {
 			app.err = multierr.Append(app.err, err)
 			app.log = fallbackLogger
 			bufferLogger.Connect(fallbackLogger)
-			app.log.LogEvent(&fxevent.CustomLoggerError{Err: err})
+			app.log.LogEvent(&fxevent.CustomLogger{Err: err})
 			return app
 		}
 		app.log.LogEvent(&fxevent.CustomLogger{Function: app.logConstructor})
@@ -770,7 +770,7 @@ func (app *App) provide(p provide) {
 
 		switch {
 		case p.IsSupply:
-			app.log.LogEvent(&fxevent.Supply{TypeName: p.SupplyType.String()})
+			app.log.LogEvent(&fxevent.Supplied{TypeName: p.SupplyType.String()})
 		default:
 			outputNames := make([]string, len(info.Outputs))
 			for i, o := range info.Outputs {
@@ -795,7 +795,6 @@ func (app *App) provide(p provide) {
 			opts = append(opts, dig.Name(ann.Name))
 		case len(ann.Group) > 0:
 			opts = append(opts, dig.Group(ann.Group))
-
 		}
 
 		if err := app.container.Provide(ann.Target, opts...); err != nil {
@@ -845,7 +844,7 @@ func (app *App) executeInvokes() error {
 		}
 
 		if err != nil {
-			app.log.LogEvent(&fxevent.InvokeError{
+			app.log.LogEvent(&fxevent.Invoke{
 				Function:   fn,
 				Err:        err,
 				Stacktrace: fmt.Sprintf("%+v", i.Stack), // format stack trace as multi-line
@@ -863,17 +862,17 @@ func (app *App) run(done <-chan os.Signal) {
 	defer cancel()
 
 	if err := app.Start(startCtx); err != nil {
-		app.log.LogEvent(&fxevent.StartError{Err: err})
+		app.log.LogEvent(&fxevent.Started{Err: err})
 		os.Exit(1)
 	}
 	sig := <-done
-	app.log.LogEvent(&fxevent.StopSignal{Signal: sig})
+	app.log.LogEvent(&fxevent.Stop{Signal: sig})
 
 	stopCtx, cancel := context.WithTimeout(context.Background(), app.StopTimeout())
 	defer cancel()
 
 	if err := app.Stop(stopCtx); err != nil {
-		app.log.LogEvent(&fxevent.StopError{Err: err})
+		app.log.LogEvent(&fxevent.Stop{Err: err})
 		os.Exit(1)
 	}
 }
@@ -889,14 +888,14 @@ func (app *App) start(ctx context.Context) error {
 		// Start failed, rolling back.
 		app.log.LogEvent(&fxevent.Rollback{StartErr: err})
 		if stopErr := app.lifecycle.Stop(ctx); stopErr != nil {
-			app.log.LogEvent(&fxevent.RollbackError{Err: stopErr})
+			app.log.LogEvent(&fxevent.Rollback{Err: stopErr})
 
 			return multierr.Append(err, stopErr)
 		}
 
 		return err
 	}
-	app.log.LogEvent(&fxevent.Running{})
+	app.log.LogEvent(&fxevent.Started{})
 
 	return nil
 }
diff --git a/fxevent/console.go b/fxevent/console.go
index 0fee5c4..c8775e1 100644
--- a/fxevent/console.go
+++ b/fxevent/console.go
@@ -53,34 +53,45 @@ func (l *ConsoleLogger) LogEvent(event Event) {
 		} else {
 			l.logf("HOOK %s\t\t%s called by %s ran successfully in %s", e.Method, e.FunctionName, e.CallerName, e.Runtime)
 		}
-	case *ProvideError:
-		l.logf("Error after options were applied: %v", e.Err)
-	case *Supply:
+	case *Supplied:
 		l.logf("SUPPLY\t%v", e.TypeName)
 	case *Provide:
 		for _, rtype := range e.OutputTypeNames {
 			l.logf("PROVIDE\t%v <= %v", rtype, fxreflect.FuncName(e.Constructor))
 		}
+		if e.Err != nil {
+			l.logf("Error after options were applied: %v", e.Err)
+		}
 	case *Invoke:
-		l.logf("INVOKE\t\t%s", fxreflect.FuncName(e.Function))
-	case *InvokeError:
-		l.logf("fx.Invoke(%v) called from:\n%+vFailed: %v",
-			fxreflect.FuncName(e.Function), e.Stacktrace, e.Err)
-	case *StartError:
-		l.logf("ERROR\t\tFailed to start: %v", e.Err)
-	case *StopSignal:
-		l.logf("%v", strings.ToUpper(e.Signal.String()))
-	case *StopError:
-		l.logf("ERROR\t\tFailed to stop cleanly: %v", e.Err)
-	case *RollbackError:
-		l.logf("ERROR\t\tCouldn't roll back cleanly: %v", e.Err)
+		if e.Err != nil {
+			l.logf("fx.Invoke(%v) called from:\n%+vFailed: %v",
+				fxreflect.FuncName(e.Function), e.Stacktrace, e.Err)
+		} else {
+			l.logf("INVOKE\t\t%s", fxreflect.FuncName(e.Function))
+		}
+	case *Stop:
+		if e.Err != nil {
+			l.logf("ERROR\t\tFailed to stop cleanly: %v", e.Err)
+		} else {
+			l.logf("%v", strings.ToUpper(e.Signal.String()))
+		}
 	case *Rollback:
-		l.logf("ERROR\t\tStart failed, rolling back: %v", e.StartErr)
-	case *Running:
-		l.logf("RUNNING")
-	case *CustomLoggerError:
-		l.logf("ERROR\t\tFailed to construct custom logger: %v", e.Err)
+		if e.Err != nil {
+			l.logf("ERROR\t\tCouldn't roll back cleanly: %v", e.Err)
+		} else {
+			l.logf("ERROR\t\tStart failed, rolling back: %v", e.StartErr)
+		}
+	case *Started:
+		if e.Err != nil {
+			l.logf("ERROR\t\tFailed to start: %v", e.Err)
+		} else {
+			l.logf("RUNNING")
+		}
 	case *CustomLogger:
-		l.logf("LOGGER\tSetting up custom logger from %v", fxreflect.FuncName(e.Function))
+		if e.Err != nil {
+			l.logf("ERROR\t\tFailed to construct custom logger: %v", e.Err)
+		} else {
+			l.logf("LOGGER\tSetting up custom logger from %v", fxreflect.FuncName(e.Function))
+		}
 	}
 }
diff --git a/fxevent/event.go b/fxevent/event.go
index a58b473..3093f0a 100644
--- a/fxevent/event.go
+++ b/fxevent/event.go
@@ -33,18 +33,12 @@ type Event interface {
 // Passing events by type to make Event hashable in the future.
 func (*LifecycleHookExecuting) event() {}
 func (*LifecycleHookExecuted) event()  {}
-func (*ProvideError) event()           {}
-func (*Supply) event()                 {}
+func (*Supplied) event()               {}
 func (*Provide) event()                {}
 func (*Invoke) event()                 {}
-func (*InvokeError) event()            {}
-func (*StartError) event()             {}
-func (*StopSignal) event()             {}
-func (*StopError) event()              {}
+func (*Stop) event()                   {}
 func (*Rollback) event()               {}
-func (*RollbackError) event()          {}
-func (*Running) event()                {}
-func (*CustomLoggerError) event()      {}
+func (*Started) event()                {}
 func (*CustomLogger) event()           {}
 
 // LifecycleHookExecuting is emitted before an OnStart hook is about to be executed.
@@ -66,14 +60,9 @@ type LifecycleHookExecuted struct {
 	Err          error
 }
 
-// ProvideError is emitted whenever there is an error applying options.
-type ProvideError struct {
-	Err error
-}
-
-// Supply is emitted whenever a Provide was called with a constructor provided
+// Supplied is emitted whenever a Provide was called with a constructor provided
 // by fx.Supply.
-type Supply struct {
+type Supplied struct {
 	TypeName string
 }
 
@@ -84,44 +73,38 @@ type Provide struct {
 	// OutputTypeNames is a list of names of types that are produced by
 	// this constructor.
 	OutputTypeNames []string
-}
 
-// Invoke is emitted whenever a function is invoked.
-type Invoke struct {
-	Function interface{}
+	// Err is emitted if there was an error applying options.
+	Err error
 }
 
-// InvokeError is emitted when fx.Invoke has failed.
-type InvokeError struct {
+// Invoke is emitted whenever a function is being invoked and/or it errored.
+type Invoke struct {
 	Function   interface{}
 	Err        error
 	Stacktrace string
 }
 
-// StartError is emitted right before exiting after failing to start.
-type StartError struct{ Err error }
-
-// StopSignal is emitted whenever application receives a signal after
-// starting the application.
-type StopSignal struct{ Signal os.Signal }
-
-// StopError is emitted whenever we fail to stop cleanly.
-type StopError struct{ Err error }
-
-// Rollback is emitted whenever a service fails to start.
-type Rollback struct{ StartErr error }
+// Started is emitted whenever an application is started successfully and/or
+// it errored.
+type Started struct{ Err error }
 
-// RollbackError is emitted whenever we fail to rollback cleanly after
-// a start error.
-type RollbackError struct{ Err error }
-
-// Running is emitted whenever an application is started successfully.
-type Running struct{}
+// Stop is emitted whenever application receives a signal after
+// starting the application with an optional error.
+type Stop struct {
+	Signal os.Signal
+	Err    error
+}
 
-// CustomLoggerError is emitted whenever a custom logger fails to construct.
-type CustomLoggerError struct{ Err error }
+// Rollback is emitted whenever a service fails to start with initial startup
+// error and then optional error if rollback itself fails.
+type Rollback struct {
+	StartErr error
+	Err      error
+}
 
-// CustomLogger is emitted whenever a custom logger is set.
+// CustomLogger is emitted whenever a custom logger is set or produces an error.
 type CustomLogger struct {
 	Function interface{}
+	Err      error
 }
diff --git a/fxevent/zap.go b/fxevent/zap.go
index 63cc15f..3d84a86 100644
--- a/fxevent/zap.go
+++ b/fxevent/zap.go
@@ -59,43 +59,54 @@ func (l *ZapLogger) LogEvent(event Event) {
 				zap.String("runtime", e.Runtime.String()),
 			)
 		}
-	case *ProvideError:
-		l.Logger.Error("error encountered while applying options",
-			zap.Error(e.Err))
-	case *Supply:
-		l.Logger.Info("supplying", zap.String("type", e.TypeName))
+	case *Supplied:
+		l.Logger.Info("supplied", zap.String("type", e.TypeName))
 	case *Provide:
 		for _, rtype := range e.OutputTypeNames {
-			l.Logger.Info("providing",
+			l.Logger.Info("provided",
 				zap.String("constructor", fxreflect.FuncName(e.Constructor)),
 				zap.String("type", rtype),
 			)
 		}
+		if e.Err != nil {
+			l.Logger.Error("error encountered while applying options",
+				zap.Error(e.Err))
+		}
 	case *Invoke:
-		l.Logger.Info("invoke",
-			zap.String("function", fxreflect.FuncName(e.Function)))
-	case *InvokeError:
-		l.Logger.Error("fx.Invoke failed",
-			zap.Error(e.Err),
-			zap.String("stack", e.Stacktrace),
-			zap.String("function", fxreflect.FuncName(e.Function)))
-	case *StartError:
-		l.Logger.Error("failed to start", zap.Error(e.Err))
-	case *StopSignal:
-		l.Logger.Info("received signal",
-			zap.String("signal", strings.ToUpper(e.Signal.String())))
-	case *StopError:
-		l.Logger.Error("failed to stop cleanly", zap.Error(e.Err))
-	case *RollbackError:
-		l.Logger.Error("could not rollback cleanly", zap.Error(e.Err))
+		if e.Err != nil {
+			l.Logger.Error("invoke failed",
+				zap.Error(e.Err),
+				zap.String("stack", e.Stacktrace),
+				zap.String("function", fxreflect.FuncName(e.Function)))
+		} else {
+			l.Logger.Info("invoked",
+				zap.String("function", fxreflect.FuncName(e.Function)))
+		}
+	case *Stop:
+		if e.Err != nil {
+			l.Logger.Error("stop failed", zap.Error(e.Err))
+		} else {
+			l.Logger.Info("received signal",
+				zap.String("signal", strings.ToUpper(e.Signal.String())))
+		}
 	case *Rollback:
-		l.Logger.Error("startup failed, rolling back", zap.Error(e.StartErr))
-	case *Running:
-		l.Logger.Info("running")
-	case *CustomLoggerError:
-		l.Logger.Error("error constructing logger", zap.Error(e.Err))
+		if e.Err != nil {
+			l.Logger.Error("rollback failed", zap.Error(e.Err))
+		} else {
+			l.Logger.Error("start failed, rolling back", zap.Error(e.StartErr))
+		}
+	case *Started:
+		if e.Err != nil {
+			l.Logger.Error("start failed", zap.Error(e.Err))
+		} else {
+			l.Logger.Info("started")
+		}
 	case *CustomLogger:
-		l.Logger.Info("installing custom fxevent.Logger",
-			zap.String("function", fxreflect.FuncName(e.Function)))
+		if e.Err != nil {
+			l.Logger.Error("custom logger installation failed", zap.Error(e.Err))
+		} else {
+			l.Logger.Info("installed custom fxevent.Logger",
+				zap.String("function", fxreflect.FuncName(e.Function)))
+		}
 	}
 }
diff --git a/log.go b/log.go
index bf7660e..e3b960c 100644
--- a/log.go
+++ b/log.go
@@ -31,7 +31,7 @@ type logBuffer struct {
 	logger fxevent.Logger
 }
 
-// LogEvents buffers or logs an event.
+// LogEvent buffers or logs an event.
 func (l *logBuffer) LogEvent(event fxevent.Event) {
 	if l.logger == nil {
 		l.events = append(l.events, event)


Test patch:
diff --git a/annotated_test.go b/annotated_test.go
index c4a53b4..2b3158a 100644
--- a/annotated_test.go
+++ b/annotated_test.go
@@ -42,7 +42,7 @@ func TestAnnotated(t *testing.T) {
 	newA := func() *a {
 		return &a{name: "foo"}
 	}
-	t.Run("Provided", func(t *testing.T) {
+	t.Run("Provide", func(t *testing.T) {
 		var in in
 		app := fxtest.New(t,
 			fx.Provide(
diff --git a/app_test.go b/app_test.go
index c71b979..5abc8f9 100644
--- a/app_test.go
+++ b/app_test.go
@@ -46,7 +46,7 @@ import (
 
 func NewForTest(tb testing.TB, opts ...Option) *App {
 	testOpts := []Option{
-		// Provide both, Logger and WithLogger so that if the test
+		// Provide both: Logger and WithLogger so that if the test
 		// WithLogger fails, we don't pollute stderr.
 		Logger(fxtest.NewTestPrinter(tb)),
 		WithLogger(func() fxevent.Logger { return fxtest.NewTestLogger(tb) }),
@@ -80,7 +80,7 @@ func TestNewApp(t *testing.T) {
 			WithLogger(func() fxevent.Logger { return spy }))
 		defer app.RequireStart().RequireStop()
 		require.Equal(t,
-			[]string{"Provide", "Provide", "Provide", "Provide", "CustomLogger", "Running"},
+			[]string{"Provide", "Provide", "Provide", "Provide", "CustomLogger", "Started"},
 			spy.EventTypes())
 
 		assert.Contains(t, spy.Events()[0].(*fxevent.Provide).OutputTypeNames, "struct {}")
@@ -286,7 +286,7 @@ func TestWithLogger(t *testing.T) {
 		)
 
 		assert.Equal(t, []string{
-			"Supply", "Provide", "Provide", "Provide", "CustomLogger",
+			"Supplied", "Provide", "Provide", "Provide", "CustomLogger",
 		}, spy.EventTypes())
 
 		spy.Reset()
@@ -294,7 +294,7 @@ func TestWithLogger(t *testing.T) {
 
 		require.NoError(t, app.Err())
 
-		assert.Equal(t, []string{"Running"}, spy.EventTypes())
+		assert.Equal(t, []string{"Started"}, spy.EventTypes())
 	})
 
 	t.Run("error in WithLogger provider, use default", func(t *testing.T) {
@@ -361,7 +361,7 @@ func TestWithLogger(t *testing.T) {
 			"must provide constructor function, got  (type *bytes.Buffer)",
 		)
 
-		assert.Equal(t, []string{"Supply", "ProvideError", "CustomLogger"}, spy.EventTypes())
+		assert.Equal(t, []string{"Supplied", "Provide", "CustomLogger"}, spy.EventTypes())
 	})
 
 	t.Run("logger failed to build", func(t *testing.T) {
@@ -576,8 +576,8 @@ func TestOptions(t *testing.T) {
 			Provide(&bytes.Buffer{}), // error, not a constructor
 			WithLogger(func() fxevent.Logger { return spy }),
 		)
-		require.Equal(t, []string{"ProvideError", "CustomLogger"}, spy.EventTypes())
-		assert.Contains(t, spy.Events()[0].(*fxevent.ProvideError).Err.Error(), "must provide constructor function")
+		require.Equal(t, []string{"Provide", "CustomLogger"}, spy.EventTypes())
+		assert.Contains(t, spy.Events()[0].(*fxevent.Provide).Err.Error(), "must provide constructor function")
 	})
 }
 
@@ -810,9 +810,9 @@ func TestAppStart(t *testing.T) {
 		//         /.../go/1.13.3/libexec/src/testing/testing.go:909
 		// Failed: can't invoke non-function {} (type struct {})
 		require.Equal(t,
-			[]string{"Provide", "Provide", "Provide", "CustomLogger", "Invoke", "InvokeError"},
+			[]string{"Provide", "Provide", "Provide", "CustomLogger", "Invoke", "Invoke"},
 			spy.EventTypes())
-		failedEvent := spy.Events()[len(spy.EventTypes())-1].(*fxevent.InvokeError)
+		failedEvent := spy.Events()[len(spy.EventTypes())-1].(*fxevent.Invoke)
 		assert.Contains(t, failedEvent.Err.Error(), "can't invoke non-function")
 		assert.Contains(t, failedEvent.Stacktrace, "go.uber.org/fx_test.TestAppStart")
 		assert.Contains(t, failedEvent.Stacktrace, "fx/app_test.go")
@@ -1048,7 +1048,7 @@ func TestReplaceLogger(t *testing.T) {
 	spy := new(fxlog.Spy)
 	app := fxtest.New(t, WithLogger(func() fxevent.Logger { return spy }))
 	app.RequireStart().RequireStop()
-	assert.Equal(t, []string{"Provide", "Provide", "Provide", "CustomLogger", "Running"}, spy.EventTypes())
+	assert.Equal(t, []string{"Provide", "Provide", "Provide", "CustomLogger", "Started"}, spy.EventTypes())
 }
 
 func TestNopLogger(t *testing.T) {
@@ -1120,7 +1120,7 @@ func TestCustomLoggerWithLifecycle(t *testing.T) {
 		"CustomLogger",
 		"LifecycleHookExecuting",
 		"LifecycleHookExecuted",
-		"Running",
+		"Started",
 		"LifecycleHookExecuting",
 		"LifecycleHookExecuted",
 	}, spy.EventTypes())
@@ -1269,12 +1269,12 @@ func TestOptionString(t *testing.T) {
 			want: "fx.ErrorHook(TestOptionString)",
 		},
 		{
-			desc: "Supply/simple",
+			desc: "Supplied/simple",
 			give: Supply(bytes.NewReader(nil), bytes.NewBuffer(nil)),
 			want: "fx.Supply(*bytes.Reader, *bytes.Buffer)",
 		},
 		{
-			desc: "Supply/Annotated",
+			desc: "Supplied/Annotated",
 			give: Supply(Annotated{Target: bytes.NewReader(nil)}),
 			want: "fx.Supply(*bytes.Reader)",
 		},
diff --git a/fxevent/console_test.go b/fxevent/console_test.go
index bc3ad30..d7ac835 100644
--- a/fxevent/console_test.go
+++ b/fxevent/console_test.go
@@ -71,27 +71,27 @@ func TestConsoleLogger(t *testing.T) {
 		},
 		{
 			name: "ProvideError",
-			give: &ProvideError{Err: errors.New("some error")},
+			give: &Provide{Err: errors.New("some error")},
 			want: "[Fx] Error after options were applied: some error\n",
 		},
 		{
-			name: "Supply",
-			give: &Supply{TypeName: "*bytes.Buffer"},
+			name: "Supplied",
+			give: &Supplied{TypeName: "*bytes.Buffer"},
 			want: "[Fx] SUPPLY	*bytes.Buffer\n",
 		},
 		{
 			name: "Provide",
-			give: &Provide{bytes.NewBuffer, []string{"*bytes.Buffer"}},
+			give: &Provide{bytes.NewBuffer, []string{"*bytes.Buffer"}, nil},
 			want: "[Fx] PROVIDE	*bytes.Buffer <= bytes.NewBuffer()\n",
 		},
 		{
 			name: "Invoke",
-			give: &Invoke{bytes.NewBuffer},
+			give: &Invoke{Function: bytes.NewBuffer, Err: nil},
 			want: "[Fx] INVOKE		bytes.NewBuffer()\n",
 		},
 		{
 			name: "InvokeError",
-			give: &InvokeError{
+			give: &Invoke{
 				Function:   bytes.NewBuffer,
 				Err:        errors.New("some error"),
 				Stacktrace: "foo()\n\tbar/baz.go:42\n",
@@ -105,22 +105,22 @@ func TestConsoleLogger(t *testing.T) {
 		},
 		{
 			name: "StartError",
-			give: &StartError{Err: errors.New("some error")},
+			give: &Started{Err: errors.New("some error")},
 			want: "[Fx] ERROR		Failed to start: some error\n",
 		},
 		{
-			name: "StopSignal",
-			give: &StopSignal{Signal: os.Interrupt},
+			name: "Stop",
+			give: &Stop{Signal: os.Interrupt},
 			want: "[Fx] INTERRUPT\n",
 		},
 		{
 			name: "StopError",
-			give: &StopError{Err: errors.New("some error")},
+			give: &Stop{Err: errors.New("some error")},
 			want: "[Fx] ERROR		Failed to stop cleanly: some error\n",
 		},
 		{
 			name: "RollbackError",
-			give: &RollbackError{Err: errors.New("some error")},
+			give: &Rollback{Err: errors.New("some error")},
 			want: "[Fx] ERROR		Couldn't roll back cleanly: some error\n",
 		},
 		{
@@ -129,13 +129,13 @@ func TestConsoleLogger(t *testing.T) {
 			want: "[Fx] ERROR		Start failed, rolling back: some error\n",
 		},
 		{
-			name: "Running",
-			give: &Running{},
+			name: "Started",
+			give: &Started{},
 			want: "[Fx] RUNNING\n",
 		},
 		{
 			name: "CustomLoggerError",
-			give: &CustomLoggerError{Err: errors.New("great sadness")},
+			give: &CustomLogger{Err: errors.New("great sadness")},
 			want: "[Fx] ERROR		Failed to construct custom logger: great sadness\n",
 		},
 		{
diff --git a/fxevent/event_test.go b/fxevent/event_test.go
index 798740a..2b6ade4 100644
--- a/fxevent/event_test.go
+++ b/fxevent/event_test.go
@@ -31,18 +31,12 @@ func TestForCoverage(t *testing.T) {
 	events := []Event{
 		&LifecycleHookExecuting{},
 		&LifecycleHookExecuted{},
-		&ProvideError{},
-		&Supply{},
+		&Supplied{},
 		&Provide{},
 		&Invoke{},
-		&InvokeError{},
-		&StartError{},
-		&StopSignal{},
-		&StopError{},
+		&Stop{},
 		&Rollback{},
-		&RollbackError{},
-		&Running{},
-		&CustomLoggerError{},
+		&Started{},
 		&CustomLogger{},
 	}
 
diff --git a/fxevent/zap_test.go b/fxevent/zap_test.go
index 2d99725..4bd81a8 100644
--- a/fxevent/zap_test.go
+++ b/fxevent/zap_test.go
@@ -60,6 +60,7 @@ func TestZapLogger(t *testing.T) {
 			},
 		},
 		{
+
 			name: "LifecycleHookExecutedError",
 			give: &LifecycleHookExecuted{
 				Method:       "OnStart",
@@ -92,42 +93,42 @@ func TestZapLogger(t *testing.T) {
 			},
 		},
 		{
-			name:        "ProvideError",
-			give:        &ProvideError{Err: someError},
-			wantMessage: "error encountered while applying options",
-			wantFields: map[string]interface{}{
-				"error": "some error",
-			},
-		},
-		{
-			name:        "Supply",
-			give:        &Supply{TypeName: "*bytes.Buffer"},
-			wantMessage: "supplying",
+			name:        "Supplied",
+			give:        &Supplied{TypeName: "*bytes.Buffer"},
+			wantMessage: "supplied",
 			wantFields: map[string]interface{}{
 				"type": "*bytes.Buffer",
 			},
 		},
 		{
 			name:        "Provide",
-			give:        &Provide{bytes.NewBuffer, []string{"*bytes.Buffer"}},
-			wantMessage: "providing",
+			give:        &Provide{bytes.NewBuffer, []string{"*bytes.Buffer"}, nil},
+			wantMessage: "provided",
 			wantFields: map[string]interface{}{
 				"constructor": "bytes.NewBuffer()",
 				"type":        "*bytes.Buffer",
 			},
 		},
+		{
+			name:        "Provide with Error",
+			give:        &Provide{Err: someError},
+			wantMessage: "error encountered while applying options",
+			wantFields: map[string]interface{}{
+				"error": "some error",
+			},
+		},
 		{
 			name:        "Invoke",
-			give:        &Invoke{bytes.NewBuffer},
-			wantMessage: "invoke",
+			give:        &Invoke{Function: bytes.NewBuffer, Err: nil},
+			wantMessage: "invoked",
 			wantFields: map[string]interface{}{
 				"function": "bytes.NewBuffer()",
 			},
 		},
 		{
 			name:        "InvokeError",
-			give:        &InvokeError{Function: bytes.NewBuffer, Err: someError},
-			wantMessage: "fx.Invoke failed",
+			give:        &Invoke{Function: bytes.NewBuffer, Err: someError},
+			wantMessage: "invoke failed",
 			wantFields: map[string]interface{}{
 				"error":    "some error",
 				"stack":    "",
@@ -136,15 +137,15 @@ func TestZapLogger(t *testing.T) {
 		},
 		{
 			name:        "StartError",
-			give:        &StartError{Err: someError},
-			wantMessage: "failed to start",
+			give:        &Started{Err: someError},
+			wantMessage: "start failed",
 			wantFields: map[string]interface{}{
 				"error": "some error",
 			},
 		},
 		{
-			name:        "StopSignal",
-			give:        &StopSignal{Signal: os.Interrupt},
+			name:        "Stop",
+			give:        &Stop{Signal: os.Interrupt},
 			wantMessage: "received signal",
 			wantFields: map[string]interface{}{
 				"signal": "INTERRUPT",
@@ -152,16 +153,16 @@ func TestZapLogger(t *testing.T) {
 		},
 		{
 			name:        "StopError",
-			give:        &StopError{Err: someError},
-			wantMessage: "failed to stop cleanly",
+			give:        &Stop{Err: someError},
+			wantMessage: "stop failed",
 			wantFields: map[string]interface{}{
 				"error": "some error",
 			},
 		},
 		{
 			name:        "RollbackError",
-			give:        &RollbackError{Err: someError},
-			wantMessage: "could not rollback cleanly",
+			give:        &Rollback{Err: someError},
+			wantMessage: "rollback failed",
 			wantFields: map[string]interface{}{
 				"error": "some error",
 			},
@@ -169,29 +170,29 @@ func TestZapLogger(t *testing.T) {
 		{
 			name:        "Rollback",
 			give:        &Rollback{StartErr: someError},
-			wantMessage: "startup failed, rolling back",
+			wantMessage: "start failed, rolling back",
 			wantFields: map[string]interface{}{
 				"error": "some error",
 			},
 		},
 		{
-			name:        "Running",
-			give:        &Running{},
-			wantMessage: "running",
+			name:        "Started",
+			give:        &Started{},
+			wantMessage: "started",
 			wantFields:  map[string]interface{}{},
 		},
 		{
-			name:        "CustomLoggerError",
-			give:        &CustomLoggerError{Err: someError},
-			wantMessage: "error constructing logger",
+			name:        "CustomLogger Error",
+			give:        &CustomLogger{Err: someError},
+			wantMessage: "custom logger installation failed",
 			wantFields: map[string]interface{}{
 				"error": "some error",
 			},
 		},
 		{
 			name:        "CustomLogger",
-			give:        &CustomLogger{bytes.NewBuffer},
-			wantMessage: "installing custom fxevent.Logger",
+			give:        &CustomLogger{Function: bytes.NewBuffer, Err: nil},
+			wantMessage: "installed custom fxevent.Logger",
 			wantFields: map[string]interface{}{
 				"function": "bytes.NewBuffer()",
 			},
diff --git a/internal/fxlog/spy_test.go b/internal/fxlog/spy_test.go
index 164605b..bbe330a 100644
--- a/internal/fxlog/spy_test.go
+++ b/internal/fxlog/spy_test.go
@@ -36,14 +36,14 @@ func TestSpy(t *testing.T) {
 		assert.Empty(t, s.EventTypes(), "event types must be empty")
 	})
 
-	s.LogEvent(&fxevent.Running{})
+	s.LogEvent(&fxevent.Started{})
 	t.Run("use after reset", func(t *testing.T) {
-		assert.Equal(t, "Running", s.EventTypes()[0])
+		assert.Equal(t, "Started", s.EventTypes()[0])
 	})
 
-	s.LogEvent(&fxevent.ProvideError{Err: fmt.Errorf("some error")})
+	s.LogEvent(&fxevent.Provide{Err: fmt.Errorf("some error")})
 	t.Run("some error", func(t *testing.T) {
-		assert.Equal(t, "ProvideError", s.EventTypes()[1])
+		assert.Equal(t, "Provide", s.EventTypes()[1])
 	})
 
 	s.Reset()
@@ -52,8 +52,8 @@ func TestSpy(t *testing.T) {
 		assert.Empty(t, s.EventTypes(), "event types must be empty")
 	})
 
-	s.LogEvent(&fxevent.Running{})
+	s.LogEvent(&fxevent.Started{})
 	t.Run("use after reset", func(t *testing.T) {
-		assert.Equal(t, "Running", s.EventTypes()[0])
+		assert.Equal(t, "Started", s.EventTypes()[0])
 	})
 }
diff --git a/log_test.go b/log_test.go
index ab23cc1..f9b6f1f 100644
--- a/log_test.go
+++ b/log_test.go
@@ -30,7 +30,7 @@ import (
 
 func TestLogBufferConnect(t *testing.T) {
 	spy := new(fxlog.Spy)
-	event := &fxevent.Running{}
+	event := &fxevent.Started{}
 	lb := &logBuffer{
 		events: []fxevent.Event{event},
 		logger: nil,
@@ -42,7 +42,7 @@ func TestLogBufferConnect(t *testing.T) {
 
 func TestLogBufferLog(t *testing.T) {
 	spy := new(fxlog.Spy)
-	event := &fxevent.Running{}
+	event := &fxevent.Started{}
 	lb := &logBuffer{
 		events: nil,
 		logger: nil,