logging.basicConfig should only be in top level scripts.
authorDiane Trout <diane@caltech.edu>
Tue, 13 May 2008 16:17:11 +0000 (16:17 +0000)
committerDiane Trout <diane@caltech.edu>
Tue, 13 May 2008 16:17:11 +0000 (16:17 +0000)
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)

gaworkflow/pipeline/configure_run.py
scripts/configure_pipeline

index 1db662cbad456e3806bfe42995b3c057b980d6a0..272d1ae3431ecff959ec05ec85de8fc7d8d32a0f 100644 (file)
@@ -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):
index 495b1c002ed98f507209067f35702d0adc63df08..6083d5166c3555b9f613cfea09f028cc9c7ea7de 100644 (file)
@@ -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.