Skip to content

Commit cf018ea

Browse files
committed
Refactor: Streamline lock logging in WithLock function
1 parent 3cedfe3 commit cf018ea

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

cache.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,8 @@ func WithLock(ctx context.Context, cache CacheClient, lockKey string, action fun
7575
releaseErr := cache.ReleaseLock(ctx, lockKey)
7676
if releaseErr != nil {
7777
log.Printf("Warning: Failed to release lock '%s': %v", lockKey, releaseErr)
78-
} else {
79-
log.Printf("Lock released for key '%s'", lockKey)
8078
}
8179
}()
82-
log.Printf("Lock acquired for key '%s'", lockKey)
8380
return action(ctx)
8481
}
8582

0 commit comments

Comments
 (0)