diff options
author | 2010-05-19 11:29:51 -0500 | |
---|---|---|
committer | 2010-05-19 11:29:51 -0500 | |
commit | 943a20b0af4647da0400f0a342f23694da16076c (patch) | |
tree | 501635de35aebb7e26beb49d1c87a276c9cfdcd6 | |
parent | apache vhost conf and wsgi examples (diff) | |
download | gentoo-ads-943a20b0af4647da0400f0a342f23694da16076c.tar.gz gentoo-ads-943a20b0af4647da0400f0a342f23694da16076c.tar.bz2 gentoo-ads-943a20b0af4647da0400f0a342f23694da16076c.zip |
example_settings.py and logging_setup.py updated
removed AD_LOG_PREFIX from example_settings.py
added AD_LOG_PREFIX to logging_setup.py
added import of AD_LOG_PREFIX to example_settings.py
updated comments in example_settings.py and setup_logging.py
-rw-r--r-- | gentoo_ads/example_settings.py | 10 | ||||
-rw-r--r-- | gentoo_ads/logging_setup.py | 4 |
2 files changed, 9 insertions, 5 deletions
diff --git a/gentoo_ads/example_settings.py b/gentoo_ads/example_settings.py index 60cb68d..47bda69 100644 --- a/gentoo_ads/example_settings.py +++ b/gentoo_ads/example_settings.py @@ -8,19 +8,19 @@ from imp import load_source import os +from logging_setup import setup_logging, AD_LOG_PREFIX ## this is the path to the file containing your advertiser dictionaries. ## please note, in general the ads.py file should live outside the webroot. CONFIG_PATH = '/some/path/towards/the/file/gentoo-ads/example_ads.py' -## Put in an identifying string like gentoo-ads -## This facilitates filtering with syslog -AD_LOG_PREFIX = 'example-domain-ads' - -## PLEASE NOTE: You need to setup two variables in logging_setup.py, namely LOGGING_DEBUG and SYS_LOG_ADDRESS +## PLEASE NOTE: You need to setup three variables in logging_setup.py, namely LOGGING_DEBUG, AD_LOG_PREFIX , and SYS_LOG_ADDRESS ## IF LOGGING_DEBUG = True we log to both the console (for debugging) and syslog +##AD_LOG_PREFIX = ''some-identifying-string' to facilitate filtering log messages with syslog ## SYS_LOG_ADDRESS is simply the log file you wish to use, in general and since we want to use the SysLogHandler, we desire to log to /dev/log + + ## nifty, facilitates use of advertiser dictionary ## loads a python module living somwhere on the machine ## though if it finds a good .pyc|o it will use it first diff --git a/gentoo_ads/logging_setup.py b/gentoo_ads/logging_setup.py index a8ceef0..5a2d8b1 100644 --- a/gentoo_ads/logging_setup.py +++ b/gentoo_ads/logging_setup.py @@ -7,6 +7,10 @@ LOGGING_DEBUG = True SYS_LOG_ADDRESS = '/dev/log' +## Put in an identifying string like gentoo-ads +## This facilitates filtering with syslog +AD_LOG_PREFIX = 'example-domain-ads' + if not hasattr(logging, "set_up_done"): logging.set_up_done=False |