From 03c50ac8c2e1c6d9ba28225dc99f7643a999b552 Mon Sep 17 00:00:00 2001 From: John Wregglesworth Date: Thu, 12 Sep 2024 13:58:04 -0700 Subject: [PATCH] Add logging --- app/summary.go | 5 +++-- main.go | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/summary.go b/app/summary.go index 30ad09a..3908841 100644 --- a/app/summary.go +++ b/app/summary.go @@ -31,13 +31,14 @@ func (a *App) GetUserSummary(ctx context.Context, username string) (*qms.Subscri return nil, err } err = tx.Wrap(func() error { - log.Debug("before getting the active user plan") + log.Debugf("before getting the active user plan: %s", username) + subscription, err = d.GetActiveSubscription(ctx, username, db.WithTX(tx)) if err != nil { log.Errorf("unable to get the active user plan: %s", err) return err } - log.Debug("after getting the active user plan") + log.Debugf("after getting the active user plan: %s", username) if subscription == nil || subscription.ID == "" { user, err := d.EnsureUser(ctx, username, db.WithTX(tx)) diff --git a/main.go b/main.go index 014d3c3..97a5b48 100644 --- a/main.go +++ b/main.go @@ -100,6 +100,8 @@ func main() { log.Fatal("users.domain must be set in the configuration file") } + log.Infof("username suffix is configured as %s", userSuffix) + natsCluster := config.String("nats.cluster") if natsCluster == "" { log.Fatalf("The %sNATS_CLUSTER environment variable or nats.cluster configuration value must be set", *envPrefix)