Skip to content

Commit 09a206b

Browse files
committed
add logs
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
1 parent b85cdef commit 09a206b

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

engine/schema/src/main/java/com/cloud/storage/dao/GuestOSHypervisorDaoImpl.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
import org.apache.cloudstack.utils.CloudStackVersion;
2424
import org.apache.commons.collections.CollectionUtils;
25+
import org.apache.log4j.Logger;
2526
import org.springframework.stereotype.Component;
2627

2728
import com.cloud.hypervisor.Hypervisor;
@@ -34,6 +35,7 @@
3435

3536
@Component
3637
public class GuestOSHypervisorDaoImpl extends GenericDaoBase<GuestOSHypervisorVO, Long> implements GuestOSHypervisorDao {
38+
private static final Logger s_logger = Logger.getLogger(GuestOSHypervisorDaoImpl.class);
3739

3840
protected final SearchBuilder<GuestOSHypervisorVO> guestOsSearch;
3941
protected final SearchBuilder<GuestOSHypervisorVO> mappingSearch;
@@ -111,6 +113,8 @@ public GuestOSHypervisorVO findByOsIdAndHypervisor(long guestOsId, String hyperv
111113
if (parentVersion == null) {
112114
return null;
113115
}
116+
s_logger.info(String.format("Mapping for guest OS ID: %d for hypervisor: %s with version: %s can not be found. " +
117+
"Trying to find one for the parent version: %s", guestOsId, hypervisorType, hypervisorVersion, parentVersion));
114118
return findByOsIdAndHypervisorInternal(guestOsId, hypervisorType, parentVersion);
115119
}
116120

@@ -161,6 +165,8 @@ public GuestOSHypervisorVO findByOsNameAndHypervisor(String guestOsName, String
161165
if (parentVersion == null) {
162166
return null;
163167
}
168+
s_logger.info(String.format("Mapping for guest OS: %s for hypervisor: %s with version: %s can not be found. " +
169+
"Trying to find one for the parent version: %s", guestOsName, hypervisorType, hypervisorVersion, parentVersion));
164170
return findByOsNameAndHypervisorInternal(guestOsName, hypervisorType, parentVersion);
165171
}
166172

0 commit comments

Comments
 (0)