static void logException(String msg, Exception e) {
    if (LOG.isDebugEnabled()) {
      LOG.debug(msg, e);
    } else {
      LOG.info(msg + ": " + e.getMessage());
    }
  }
Decorates a StatSource to be loaded and persisted in the metastore as well.
ql/src/java/org/apache/hadoop/hive/ql/plan/mapper/MetastoreStatsConnector.java