Turn off logging by default; re-enable on a per-module basis using environment variables

This commit is contained in:
Dan Williams 2007-07-24 18:29:18 -04:00
parent 9ac5d38e90
commit c5063ebc19

View File

@ -103,6 +103,11 @@ def _get_logs_dir():
return logs_dir
def start(module_id):
# Only log if logging is set up for the activity
module_key = module_id.upper() + "_DEBUG"
if not os.environ.has_key(module_key):
return
log_writer = LogWriter(module_id)
root_logger = logging.getLogger('')