From 6d876d10a18258b382e49e4f17ff916163e9f6b8 Mon Sep 17 00:00:00 2001 From: Harold Martin Date: Tue, 14 Jul 2015 09:55:01 -0700 Subject: [PATCH] turn off geocoder response logging by default --- omgeo/__init__.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/omgeo/__init__.py b/omgeo/__init__.py index b6ac8b3..9bb6ba7 100644 --- a/omgeo/__init__.py +++ b/omgeo/__init__.py @@ -125,12 +125,11 @@ def geocode(self, pq, waterfall=None, force_stats_logging=False): upstream_response_info=upstream_response_info_list) stats_dict = self.convert_geocode_result_to_nested_dicts(result) stats_dict = dict(stats_dict, original_pq=pq.__dict__) - try: - stats_logger.info(stats_dict) - except Exception as exception: - logger.error('Encountered exception while logging stats %s:\n%s', stats_dict, exception) - if force_stats_logging: - raise exception + if force_stats_logging: + try: + stats_logger.info(stats_dict) + except Exception as exception: + logger.error('Encountered exception while logging stats %s:\n%s', stats_dict, exception) return result def get_candidates(self, pq, waterfall=None):