diff options
author | Jose Lausuch <jose.lausuch@ericsson.com> | 2016-09-13 12:33:07 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-09-13 12:33:07 +0000 |
commit | 51a3806ba98cf2fa3e6ae03c0cd4a7781c89330b (patch) | |
tree | 7020ef6abfe22f6849c0c409b8a8c65dd4080bc1 /utils/test/scripts/mongo_to_elasticsearch.py | |
parent | 21f8156390bfaba48f8427f5cda8515becf675b3 (diff) | |
parent | a760ce30fa2f2550a83fcb84fe225f60eda8a357 (diff) |
Merge "add logger common process for releng scripts"
Diffstat (limited to 'utils/test/scripts/mongo_to_elasticsearch.py')
-rw-r--r-- | utils/test/scripts/mongo_to_elasticsearch.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/utils/test/scripts/mongo_to_elasticsearch.py b/utils/test/scripts/mongo_to_elasticsearch.py index 6799574f5..ea515bcd8 100644 --- a/utils/test/scripts/mongo_to_elasticsearch.py +++ b/utils/test/scripts/mongo_to_elasticsearch.py @@ -1,7 +1,6 @@ #! /usr/bin/env python import datetime import json -import logging import os import subprocess import traceback @@ -11,14 +10,11 @@ import uuid import argparse import conf_utils -import shared_utils +import logger_utils import mongo2elastic_format +import shared_utils -logger = logging.getLogger('mongo_to_elasticsearch') -logger.setLevel(logging.DEBUG) -file_handler = logging.FileHandler('/var/log/{}.log'.format('mongo_to_elasticsearch')) -file_handler.setFormatter(logging.Formatter('%(asctime)s %(levelname)s: %(message)s')) -logger.addHandler(file_handler) +logger = logger_utils.KibanaDashboardLogger('mongo2elastic').get def _fix_date(date_string): |