Log changed when the Json attribute value is null or empty
Change-Id: Ie0321efbbcc7f9c637f1bd8ea44001e5036987d3
Issue-ID: CLAMP-54
Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
* ...)
*/
public abstract class AbstractModelElement {
* ...)
*/
public abstract class AbstractModelElement {
- protected static final EELFLogger logger = EELFManager.getInstance().getLogger(AbstractModelElement.class);
- protected static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger();
+ protected static final EELFLogger logger = EELFManager.getInstance().getLogger(AbstractModelElement.class);
+ protected static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger();
private final String type;
private final ModelBpmn modelBpmn;
private final String type;
private final ModelBpmn modelBpmn;
private final ModelProperties modelProp;
private final ModelProperties modelProp;
+ private static final String LOG_ELEMENT = "Value '";
+ private static final String LOG_NOT_FOUND = "' for key 'name' not found in JSON";
+
/**
* Perform base parsing of properties for a ModelElement (such as,
* Collector, StringMatch, Policy and Tca)
/**
* Perform base parsing of properties for a ModelElement (such as,
* Collector, StringMatch, Policy and Tca)
}
}
if (value == null || value.length() == 0) {
}
}
if (value == null || value.length() == 0) {
- logger.warn(name + "=" + value);
+ logger.warn(LOG_ELEMENT + name + LOG_NOT_FOUND);
- logger.debug(name + "=" + value);
+ logger.debug(LOG_ELEMENT + name + LOG_NOT_FOUND + nodeIn.toString());
value = nodeIn.path(name).asText();
}
if (value == null || value.length() == 0) {
value = nodeIn.path(name).asText();
}
if (value == null || value.length() == 0) {
- logger.warn(name + "=" + value);
+ logger.warn(LOG_ELEMENT + name + LOG_NOT_FOUND);
- logger.debug(name + "=" + value);
+ logger.debug(LOG_ELEMENT + name + LOG_NOT_FOUND + nodeIn.toString());
}
}
if (values == null || values.isEmpty()) {
}
}
if (values == null || values.isEmpty()) {
- logger.warn(name + "=" + values);
+ logger.warn(LOG_ELEMENT + name + LOG_NOT_FOUND);
- logger.debug(name + "=" + values);
+ logger.debug(LOG_ELEMENT + name + LOG_NOT_FOUND + nodeIn.toString());