Mercurial > hg > index.fcgi > www > www-1
changeset 94:8214951cb8e7
myrss: additional logging
author | paulo |
---|---|
date | Fri, 16 Mar 2018 16:38:56 -0600 |
parents | c33c0647bf84 |
children | f111261bf40a |
files | myrss/myrss_app.py |
diffstat | 1 files changed, 9 insertions(+), 6 deletions(-) [+] |
line diff
1.1 --- a/myrss/myrss_app.py Thu Nov 02 11:57:59 2017 -0600 1.2 +++ b/myrss/myrss_app.py Fri Mar 16 16:38:56 2018 -0600 1.3 @@ -9,11 +9,11 @@ 1.4 import traceback 1.5 1.6 import logging 1.7 -logging.basicConfig( 1.8 - #level=logging.DEBUG, 1.9 - #filename="_LOG", 1.10 - #format="%(asctime)s %(levelname)-8s %(message)s", 1.11 -) 1.12 +#logging.basicConfig( 1.13 +# level=logging.DEBUG, 1.14 +# filename="_LOG", 1.15 +# format="%(asctime)s %(levelname)-8s %(message)s", 1.16 +#) 1.17 1.18 import xml.etree.ElementTree 1.19 import HTMLParser 1.20 @@ -217,6 +217,7 @@ 1.21 ret = '' 1.22 1.23 with lock: 1.24 + logging.debug("main() started") 1.25 epoch_now = time.time() 1.26 dtnow = datetime.datetime.fromtimestamp(epoch_now) 1.27 1.28 @@ -250,11 +251,13 @@ 1.29 1.30 class MyRssApp: 1.31 def __init__(self): 1.32 + logging.debug("MyRssApp.__init__() called") 1.33 self._iq = Queue.Queue(MAX_THREADS) 1.34 self._oq = Queue.Queue(MAX_THREADS) 1.35 self._main_lock = threading.Lock() 1.36 1.37 - for _ in range(MAX_THREADS): 1.38 + for i in range(MAX_THREADS): 1.39 + logging.debug("Starting thread: %d" % i) 1.40 WorkerThread(input_queue=self._iq, output_queue=self._oq).start() 1.41 1.42 def __call__(self, environ, start_response):