From: Diane Trout Date: Tue, 13 May 2008 16:17:11 +0000 (+0000) Subject: logging.basicConfig should only be in top level scripts. X-Git-Tag: stanford.caltech-merged-database-2009-jan-15~65 X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=6ec0efdbaa3ad09896c7fcc38c34f04a2bf56b80 logging.basicConfig should only be in top level scripts. using basicConfig in a module causes problems because it's likely to override the users logging.basicConfig. (from some other top level script that's using logging correctly) --- diff --git a/gaworkflow/pipeline/configure_run.py b/gaworkflow/pipeline/configure_run.py index 1db662c..272d1ae 100644 --- a/gaworkflow/pipeline/configure_run.py +++ b/gaworkflow/pipeline/configure_run.py @@ -13,12 +13,6 @@ from gaworkflow.pipeline.run_status import GARunStatus from pyinotify import WatchManager, ThreadedNotifier from pyinotify import EventsCodes, ProcessEvent -logging.basicConfig(level=logging.DEBUG, - format='%(asctime)s %(levelname)-8s %(message)s', - datefmt='%a, %d %b %Y %H:%M:%S', - filename='pipeline_main.log', - filemode='w') - class ConfigInfo: def __init__(self): diff --git a/scripts/configure_pipeline b/scripts/configure_pipeline index 495b1c0..6083d51 100644 --- a/scripts/configure_pipeline +++ b/scripts/configure_pipeline @@ -6,6 +6,12 @@ from gaworkflow.pipeline.configure_run import * from gaworkflow.pipeline import retrieve_config as _rc from gaworkflow.pipeline.monitors import startCmdLineStatusMonitor +logging.basicConfig(level=logging.DEBUG, + format='%(asctime)s %(levelname)-8s %(message)s', + datefmt='%a, %d %b %Y %H:%M:%S', + #filename='pipeline_main.log', + filemode='w') + s_fc = re.compile('FC[0-9]+') #Turn on built-in command-line parsing.