From 542f78d2df04ebbb97e38b4d217366af1676077a Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 14 Aug 2012 10:20:40 -0400 Subject: [PATCH] cc-4105: updated old media monitor install --- python_apps/media-monitor/media_monitor.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 python_apps/media-monitor/media_monitor.py diff --git a/python_apps/media-monitor/media_monitor.py b/python_apps/media-monitor/media_monitor.py new file mode 100644 index 000000000..acb219e0c --- /dev/null +++ b/python_apps/media-monitor/media_monitor.py @@ -0,0 +1,21 @@ +import logging +import time +import sys +from std_err_override import LogWriter +# configure logging +try: + logging.config.fileConfig("logging.cfg") + + #need to wait for Python 2.7 for this.. + #logging.captureWarnings(True) + + logger = logging.getLogger() + LogWriter.override_std_err(logger) + +except Exception, e: + print 'Error configuring logging: ', e + sys.exit(1) + +while True: + print("testing") + time.sleep(5)