This is an automated email from the ASF dual-hosted git repository.

dahn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/main by this push:
     new e83a347ace0 Improves StoragePoolAllocators' logs (#10475)
e83a347ace0 is described below

commit e83a347ace0773358ac398c4a04e0d62b8f84bd3
Author: julien-vaz <[email protected]>
AuthorDate: Sat Jun 14 06:23:41 2025 -0300

    Improves StoragePoolAllocators' logs (#10475)
    
    Co-authored-by: Julien Hervot de Mattos Vaz <[email protected]>
---
 .../cloudstack/storage/allocator/ClusterScopeStoragePoolAllocator.java  | 2 +-
 .../cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java      | 2 +-
 .../apache/cloudstack/storage/allocator/RandomStoragePoolAllocator.java | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/engine/storage/src/main/java/org/apache/cloudstack/storage/allocator/ClusterScopeStoragePoolAllocator.java
 
b/engine/storage/src/main/java/org/apache/cloudstack/storage/allocator/ClusterScopeStoragePoolAllocator.java
index 25e4608e58f..e7666965661 100644
--- 
a/engine/storage/src/main/java/org/apache/cloudstack/storage/allocator/ClusterScopeStoragePoolAllocator.java
+++ 
b/engine/storage/src/main/java/org/apache/cloudstack/storage/allocator/ClusterScopeStoragePoolAllocator.java
@@ -100,7 +100,7 @@ public class ClusterScopeStoragePoolAllocator extends 
AbstractStoragePoolAllocat
             }
             StoragePool storagePool = 
(StoragePool)dataStoreMgr.getPrimaryDataStore(pool.getId());
             if (filter(avoid, storagePool, dskCh, plan)) {
-                logger.debug(String.format("Found suitable cluster storage 
pool [%s] to allocate disk [%s] to it, adding to list.", pool, dskCh));
+                logger.debug("Found suitable cluster storage pool [{}] to 
allocate disk [{}] to it, adding to list.", pool, dskCh);
                 suitablePools.add(storagePool);
             } else {
                 logger.debug(String.format("Adding storage pool [%s] to avoid 
set during allocation of disk [%s].", pool, dskCh));
diff --git 
a/engine/storage/src/main/java/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
 
b/engine/storage/src/main/java/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
index 13b5f8e4814..bdf531e147b 100644
--- 
a/engine/storage/src/main/java/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
+++ 
b/engine/storage/src/main/java/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
@@ -96,7 +96,7 @@ public class ZoneWideStoragePoolAllocator extends 
AbstractStoragePoolAllocator {
             }
             StoragePool storagePool = 
(StoragePool)this.dataStoreMgr.getPrimaryDataStore(storage.getId());
             if (filter(avoid, storagePool, dskCh, plan)) {
-                logger.debug(String.format("Found suitable zone wide storage 
pool [%s] to allocate disk [%s] to it, adding to list.", storagePool, dskCh));
+                logger.debug("Found suitable zone wide storage pool [{}] to 
allocate disk [{}] to it, adding to list.", storagePool, dskCh);
                 suitablePools.add(storagePool);
             } else {
                 if (canAddStoragePoolToAvoidSet(storage)) {
diff --git 
a/plugins/storage-allocators/random/src/main/java/org/apache/cloudstack/storage/allocator/RandomStoragePoolAllocator.java
 
b/plugins/storage-allocators/random/src/main/java/org/apache/cloudstack/storage/allocator/RandomStoragePoolAllocator.java
index 831e5d2a260..5acab848236 100644
--- 
a/plugins/storage-allocators/random/src/main/java/org/apache/cloudstack/storage/allocator/RandomStoragePoolAllocator.java
+++ 
b/plugins/storage-allocators/random/src/main/java/org/apache/cloudstack/storage/allocator/RandomStoragePoolAllocator.java
@@ -66,7 +66,7 @@ public class RandomStoragePoolAllocator extends 
AbstractStoragePoolAllocator {
             StoragePool pol = 
(StoragePool)this.dataStoreMgr.getPrimaryDataStore(pool.getId());
 
             if (filter(avoid, pol, dskCh, plan)) {
-                logger.trace(String.format("Found suitable storage pool [%s], 
adding to list.", pool));
+                logger.trace("Found suitable storage pool [{}], adding to 
list.", pool);
                 suitablePools.add(pol);
             }
         }

Reply via email to