diff options
author | Matthew Summers <matthew.summers@liquidustech.com> | 2010-05-19 11:41:26 -0500 |
---|---|---|
committer | Matthew Summers <matthew.summers@liquidustech.com> | 2010-05-19 11:41:26 -0500 |
commit | 0a1ec295dcb6e1d2562120006dc3529eecb32174 (patch) | |
tree | 60aa3cf77339b125c495d8c6dcdda0dfe1f14cf7 | |
parent | example_settings.py and logging_setup.py updated (diff) | |
download | gentoo-ads-0a1ec295dcb6e1d2562120006dc3529eecb32174.tar.gz gentoo-ads-0a1ec295dcb6e1d2562120006dc3529eecb32174.tar.bz2 gentoo-ads-0a1ec295dcb6e1d2562120006dc3529eecb32174.zip |
fixing AD_LOG_PREFIX to work correctly
-rw-r--r-- | gentoo_ads/ads/views.py | 6 | ||||
-rw-r--r-- | gentoo_ads/logging_setup.py | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/gentoo_ads/ads/views.py b/gentoo_ads/ads/views.py index 6bba316..3ec28d9 100644 --- a/gentoo_ads/ads/views.py +++ b/gentoo_ads/ads/views.py @@ -28,10 +28,6 @@ def _weighted_random_sample(ads): ads = ads[:ad_i] + ads[ad_i + 1:] break - log_data = { - 'site_name': settings.AD_LOG_PREFIX, - } - ads_log_data_message = ','.join([a['name'] for a in ads_out]) - logging.info(ads_log_data_message, extra=log_data) + logging.info(ads_log_data_message) return ads_out
\ No newline at end of file diff --git a/gentoo_ads/logging_setup.py b/gentoo_ads/logging_setup.py index 5a2d8b1..8f653f1 100644 --- a/gentoo_ads/logging_setup.py +++ b/gentoo_ads/logging_setup.py @@ -26,7 +26,7 @@ def setup_logging(): else: logger.setLevel(logging.INFO) - formatter = logging.Formatter("[%(site_name)s] %(asctime)s %(levelname)s %(message)s") + formatter = logging.Formatter("["+AD_LOG_PREFIX+"] %(levelname)s %(message)s") # test console logger if LOGGING_DEBUG: |