CC-3691: Pypo needs to write stderr + stdout to the log file

-fixed
This commit is contained in:
Martin Konecny 2012-04-20 18:32:10 -04:00
parent 6e9b179afc
commit dae8682e51
10 changed files with 59 additions and 8 deletions

View file

@ -10,11 +10,17 @@ import copy
from threading import Thread
from api_clients import api_client
from std_err_override import LogWriter
from configobj import ConfigObj
# configure logging
logging.config.fileConfig("logging.cfg")
logger = logging.getLogger()
LogWriter.override_std_err(logger)
#need to wait for Python 2.7 for this..
#logging.captureWarnings(True)
# loading config file
try:
@ -24,7 +30,6 @@ try:
POLL_INTERVAL = int(config['poll_interval'])
except Exception, e:
logger = logging.getLogger()
logger.error('Error loading config file: %s', e)
sys.exit()