[sysmon] Merge prodmon features into sysmon

BUG=chromium:655796
TEST=Run sysmon and unit tests

Change-Id: Ibdedd9dd1b5edab7819cbcd99243b3af87ef1b68
Reviewed-on: https://chromium-review.googlesource.com/422422
Commit-Ready: Allen Li <ayatane@chromium.org>
Tested-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Allen Li <ayatane@chromium.org>
diff --git a/scripts/sysmon/puppet_metrics.py b/scripts/sysmon/puppet_metrics.py
index 97ab1f7..9ce0882 100644
--- a/scripts/sysmon/puppet_metrics.py
+++ b/scripts/sysmon/puppet_metrics.py
@@ -13,6 +13,8 @@
 from chromite.lib import cros_logging as logging
 from infra_libs import ts_mon
 
+logger = logging.getLogger(__name__)
+
 LAST_RUN_FILE = '/var/lib/puppet/state/last_run_summary.yaml'
 
 _config_version_metric = ts_mon.GaugeMetric(
@@ -89,7 +91,7 @@
   try:
     summary = _PuppetRunSummary(LAST_RUN_FILE)
   except Exception as e:
-    logging.warning('Error loading Puppet run summary: %s', e)
+    logger.warning('Error loading Puppet run summary: %s', e)
   else:
     _config_version_metric.set(summary.config_version)
     _puppet_version_metric.set(str(summary.puppet_version))