apache_log_metrics: Fix logging.handlers import
cros_logging has no handlers submodule - fix the import of logging.handlers.
BUG=chromium:736119
TEST=ran locally; ran unittests.
Change-Id: I2c1787024ec76b549bd85ea54edc309df64da6ad
Reviewed-on: https://chromium-review.googlesource.com/675679
Commit-Ready: Paul Hobbs <phobbs@google.com>
Tested-by: Paul Hobbs <phobbs@google.com>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
diff --git a/apache_log_metrics.py b/apache_log_metrics.py
index 073a123..199588a 100755
--- a/apache_log_metrics.py
+++ b/apache_log_metrics.py
@@ -12,6 +12,7 @@
from __future__ import print_function
import argparse
+from logging import handlers
import re
import sys
@@ -205,7 +206,7 @@
args = ParseArgs()
root = logging.getLogger()
- root.addHandler(logging.handlers.TimedRotatingFileHandler(
+ root.addHandler(handlers.TimedRotatingFileHandler(
args.logfile, when=_LOG_ROTATION_TIME,
interval=_LOG_ROTATION_INTERVAL,
backupCount=_LOG_ROTATION_BACKUP))