Add is  debug enabled check
@@ -79,7 +79,9 @@ public class MetricHandler extends AbstractExtendedSynapseHandler {
try {
loadedMetricClass = Class.forName(metricReporterClass.toString());
metricReporterInstance = (MetricReporter) loadedMetricClass.newInstance();
+ if (log.isDebugEnabled()) {
log.debug("The class " + metricReporterClass + " loaded successfully");
+ }
} catch (IllegalAccessException | ClassNotFoundException | InstantiationException e) {
log.error("Error in loading the class " + metricReporterClass.toString() +
" .Hence loading the default PrometheusReporter class ", e);
@@ -96,9 +98,10 @@ public class MetricHandler extends AbstractExtendedSynapseHandler {
*/
private MetricReporter loadDefaultPrometheusReporter() {
metricReporterInstance = new PrometheusReporter();
+ if (log.isDebugEnabled()) {
log.debug("The class org.wso2.micro.integrator.obsrvability.handler.metrics.publisher.prometheus." +
"reporter.PrometheusReporter loaded successfully");
-
+ }
return metricReporterInstance;
}
