From dc57aadb54cf6ad844dc3f7e18dc8d0b686e3e37 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Sun, 24 Feb 2019 17:25:53 -0500 Subject: [PATCH] m: don't log before populating params --- m/m.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/m/m.go b/m/m.go index 66ef134..8ac5c7e 100644 --- a/m/m.go +++ b/m/m.go @@ -57,7 +57,9 @@ func ServiceContext() context.Context { // Start performs the work of populating configuration parameters and triggering // the start event. It will return once the Start event has completed running. func Start(ctx context.Context) { - mlog.Info("populating configuration", ctx) + // no logging should happen before populate, primarily because log-level + // hasn't been populated yet, but also because it makes help output on cli + // look weird. if err := mcfg.Populate(ctx, CfgSource()); err != nil { mlog.Fatal("error populating configuration", ctx, merr.Context(err)) } else if err := mrun.Start(ctx); err != nil {