Avoid printing full stacktrace in DefaultMetricsDatabase

Change-Id: I26e1e929add05f43bcb851d39709876975bac5d6
diff --git a/apps/cpman/app/src/main/java/org/onosproject/cpman/impl/DefaultMetricsDatabase.java b/apps/cpman/app/src/main/java/org/onosproject/cpman/impl/DefaultMetricsDatabase.java
index d6f2906..1edf159 100644
--- a/apps/cpman/app/src/main/java/org/onosproject/cpman/impl/DefaultMetricsDatabase.java
+++ b/apps/cpman/app/src/main/java/org/onosproject/cpman/impl/DefaultMetricsDatabase.java
@@ -45,7 +45,7 @@
  * An implementation of control plane metrics back-end database.
  */
 public final class DefaultMetricsDatabase implements MetricsDatabase {
-    private final Logger log = LoggerFactory.getLogger(getClass());
+    private static final Logger log = LoggerFactory.getLogger(DefaultMetricsDatabase.class);
 
     private String metricName;
     private String resourceName;
@@ -112,7 +112,7 @@
                     checkArgument(rrdDb.containsDs(k), NON_EXIST_METRIC);
                     sample.setValue(k, v);
                 } catch (IOException e) {
-                    e.printStackTrace();
+                    log.error("Failed to update metric value due to {}", e.getMessage());
                 }
             });
             sample.update();
@@ -317,7 +317,7 @@
                 // always store the metric data in memory...
                 rrdDb = new RrdDb(rrdDef, RrdBackendFactory.getFactory(STORING_METHOD));
             } catch (IOException e) {
-                e.printStackTrace();
+                log.warn("Failed to create a new round-robin database due to {}", e.getMessage());
             }
 
             return new DefaultMetricsDatabase(metricName, resourceName, rrdDb);