log.Printlog.Println. NFC

This commit is contained in:
Catherine
2026-05-27 01:59:47 +00:00
parent 4d9872067d
commit f2811a4947
4 changed files with 6 additions and 10 deletions
+3 -3
View File
@@ -367,7 +367,7 @@ func (s3 *S3Backend) DeleteBlob(ctx context.Context, name string) error {
func (s3 *S3Backend) EnumerateBlobs(ctx context.Context) iter.Seq2[BlobMetadata, error] {
return func(yield func(BlobMetadata, error) bool) {
logc.Print(ctx, "s3: enumerate blobs")
logc.Println(ctx, "s3: enumerate blobs")
ctx, cancel := context.WithCancel(ctx)
defer cancel()
@@ -670,7 +670,7 @@ func (s3 *S3Backend) DeleteManifest(
func (s3 *S3Backend) EnumerateManifests(ctx context.Context) iter.Seq2[*ManifestMetadata, error] {
return func(yield func(*ManifestMetadata, error) bool) {
logc.Print(ctx, "s3: enumerate manifests")
logc.Println(ctx, "s3: enumerate manifests")
ctx, cancel := context.WithCancel(ctx)
defer cancel()
@@ -826,7 +826,7 @@ func (s3 *S3Backend) HasSiteListChanged(ctx context.Context, since time.Time) (b
}
func (s3 *S3Backend) bumpLastSiteUpdateTimestamp(ctx context.Context) error {
logc.Print(ctx, "s3: bumping last site update timestamp")
logc.Println(ctx, "s3: bumping last site update timestamp")
_, err := s3.client.PutObject(ctx, s3.bucket, lastSiteUpdateObjectName,
&bytes.Reader{}, 0, minio.PutObjectOptions{})
return err
+2 -2
View File
@@ -95,7 +95,7 @@ func createBloomExistenceCache(ctx context.Context, maxAge time.Duration) (Exist
func (c *bloomExistenceCache) handleFilterUpdates(ctx context.Context) {
for range c.accessCh {
if time.Since(c.lastRefresh) > c.maxAge {
logc.Print(ctx, "existence: refreshing")
logc.Println(ctx, "existence: refreshing")
if err := c.refresh(ctx); err != nil {
logc.Printf(ctx, "existence: refresh error: %v", err)
}
@@ -110,7 +110,7 @@ func (c *bloomExistenceCache) refresh(ctx context.Context) error {
if changed, err := backend.HasSiteListChanged(ctx, c.lastRefresh); err != nil {
return err
} else if !changed {
logc.Print(ctx, "existence: unchanged")
logc.Println(ctx, "existence: unchanged")
c.lastRefresh = time.Now()
return nil
}
-4
View File
@@ -31,10 +31,6 @@ func (l slogWithCtx) log(ctx context.Context, level slog.Level, msg string) {
logger.Handler().Handle(ctx, record)
}
func (l slogWithCtx) Print(ctx context.Context, v ...any) {
l.log(ctx, slog.LevelInfo, fmt.Sprint(v...))
}
func (l slogWithCtx) Printf(ctx context.Context, format string, v ...any) {
l.log(ctx, slog.LevelInfo, fmt.Sprintf(format, v...))
}
+1 -1
View File
@@ -18,7 +18,7 @@ func RunMigration(ctx context.Context, name string) error {
func createDomainMarkers(ctx context.Context) error {
if backend.HasFeature(ctx, FeatureCheckDomainMarker) {
logc.Print(ctx, "store already has domain markers")
logc.Println(ctx, "store already has domain markers")
return nil
}