local-dev: log memberships-ensured count in dev_sandbox bootstrap
Adds a single zap.Info line after the membership-insertion loop so the boot log explicitly shows how many participants the sandbox provisioned. The number is fixed by config (PlayerCount) but surfacing it in the log makes troubleshooting "why is the lobby empty" cases (typo in the email, partial failure) faster than querying the DB. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -197,6 +197,10 @@ func ensureMembershipsAndDrive(ctx context.Context, svc *lobby.Service, game lob
|
|||||||
return game, fmt.Errorf("dev_sandbox: insert membership %d: %w", i+1, err)
|
return game, fmt.Errorf("dev_sandbox: insert membership %d: %w", i+1, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
logger.Info("memberships ensured",
|
||||||
|
zap.Int("count", len(users)),
|
||||||
|
zap.String("game_id", game.GameID.String()),
|
||||||
|
)
|
||||||
next, err := svc.ReadyToStart(ctx, &caller, false, game.GameID)
|
next, err := svc.ReadyToStart(ctx, &caller, false, game.GameID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return game, fmt.Errorf("dev_sandbox: ready to start: %w", err)
|
return game, fmt.Errorf("dev_sandbox: ready to start: %w", err)
|
||||||
|
|||||||
Reference in New Issue
Block a user