mirror of https://github.com/apache/jclouds.git
Modify a warning message to state the problem in full right at the beginning of the message (instead of having the crucial part of the message drifting in the middle of an ocean of toString()ed objects)
This commit is contained in:
parent
f1010e13a4
commit
9194a896a6
|
@ -72,14 +72,14 @@ public class TemplateToOperatingSystem implements Function<Template, OperatingSy
|
||||||
|
|
||||||
OSType type = osTypes.get().get(from.getOSTypeId());
|
OSType type = osTypes.get().get(from.getOSTypeId());
|
||||||
if (type == null) {
|
if (type == null) {
|
||||||
logger.warn("type for template %s not found in %s", from, osTypes.get());
|
logger.warn("Template refers to OS type ID %s but this does not exist. Template=%s Known OS types=%s", from.getOSTypeId(), from, osTypes.get());
|
||||||
return builder.build();
|
return builder.build();
|
||||||
}
|
}
|
||||||
builder.description(type.getDescription());
|
builder.description(type.getDescription());
|
||||||
builder.is64Bit(type.getDescription().indexOf("64-bit") != -1);
|
builder.is64Bit(type.getDescription().indexOf("64-bit") != -1);
|
||||||
String osCategory = osCategories.get().get(type.getOSCategoryId());
|
String osCategory = osCategories.get().get(type.getOSCategoryId());
|
||||||
if (osCategory == null) {
|
if (osCategory == null) {
|
||||||
logger.warn("category for OSType %s not found in %s", type, osCategories.get());
|
logger.warn("OS type refers to OS category ID %s but this does not exist. OS type=%s Known OS categories=%s", type.getOSCategoryId(), type, osCategories.get());
|
||||||
return builder.build();
|
return builder.build();
|
||||||
}
|
}
|
||||||
builder.name(osCategory);
|
builder.name(osCategory);
|
||||||
|
|
Loading…
Reference in New Issue