mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: reduce log volume on server startup (#16608)
Addresses https://github.com/coder/coder/issues/16231. This PR reduces the volume of logs we print after server startup in order to surface the web UI URL better. Here are the logs after the changes a couple of seconds after starting the server: <img width="868" alt="Screenshot 2025-02-18 at 16 31 32" src="https://github.com/user-attachments/assets/786dc4b8-7383-48c8-a5c3-a997c01ca915" /> The warning is due to running a development site-less build. It wouldn't show in a release build.
This commit is contained in:
@@ -152,7 +152,7 @@ func (k *rotator) rotateKeys(ctx context.Context) error {
|
||||
}
|
||||
}
|
||||
if validKeys == 0 {
|
||||
k.logger.Info(ctx, "no valid keys detected, inserting new key",
|
||||
k.logger.Debug(ctx, "no valid keys detected, inserting new key",
|
||||
slog.F("feature", feature),
|
||||
)
|
||||
_, err := k.insertNewKey(ctx, tx, feature, now)
|
||||
@@ -194,7 +194,7 @@ func (k *rotator) insertNewKey(ctx context.Context, tx database.Store, feature d
|
||||
return database.CryptoKey{}, xerrors.Errorf("inserting new key: %w", err)
|
||||
}
|
||||
|
||||
k.logger.Info(ctx, "inserted new key for feature", slog.F("feature", feature))
|
||||
k.logger.Debug(ctx, "inserted new key for feature", slog.F("feature", feature))
|
||||
return newKey, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ func New(ctx context.Context, logger slog.Logger, db database.Store, clk quartz.
|
||||
return xerrors.Errorf("failed to delete old notification messages: %w", err)
|
||||
}
|
||||
|
||||
logger.Info(ctx, "purged old database entries", slog.F("duration", clk.Since(start)))
|
||||
logger.Debug(ctx, "purged old database entries", slog.F("duration", clk.Since(start)))
|
||||
|
||||
return nil
|
||||
}, database.DefaultTXOptions().WithID("db_purge")); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user