diff --git a/python_apps/media-monitor/media-monitor/mm1.py b/python_apps/media-monitor/media-monitor/mm1.py index de286994a..615b1c7d1 100755 --- a/python_apps/media-monitor/media-monitor/mm1.py +++ b/python_apps/media-monitor/media-monitor/mm1.py @@ -61,7 +61,7 @@ def configure_locale(): # configure logging try: - logging.config.fileConfig("logging.cfg") + logging.config.fileConfig("%s/logging.cfg" % os.path.dirname(os.path.realpath(__file__))) #need to wait for Python 2.7 for this.. #logging.captureWarnings(True) diff --git a/python_apps/pypo/pypo/pypomessagehandler.py b/python_apps/pypo/pypo/pypomessagehandler.py index c9f9110f5..62551b7d3 100755 --- a/python_apps/pypo/pypo/pypomessagehandler.py +++ b/python_apps/pypo/pypo/pypomessagehandler.py @@ -2,6 +2,7 @@ import logging import traceback +import os import sys from threading import Thread import time @@ -15,7 +16,7 @@ import json from std_err_override import LogWriter # configure logging -logging.config.fileConfig("logging.cfg") +logging.config.fileConfig("%s/logging.cfg" % os.path.dirname(os.path.realpath(__file__))) logger = logging.getLogger('message_h') LogWriter.override_std_err(logger)