[Python-checkins] r50657 - python/branches/hoxworth-stdlib_logging-soc/test_soc_httplib.py

jackilyn.hoxworth python-checkins at python.org
Sat Jul 15 00:42:46 CEST 2006


Author: jackilyn.hoxworth
Date: Sat Jul 15 00:42:46 2006
New Revision: 50657

Modified:
   python/branches/hoxworth-stdlib_logging-soc/test_soc_httplib.py
Log:
still not working

Modified: python/branches/hoxworth-stdlib_logging-soc/test_soc_httplib.py
==============================================================================
--- python/branches/hoxworth-stdlib_logging-soc/test_soc_httplib.py	(original)
+++ python/branches/hoxworth-stdlib_logging-soc/test_soc_httplib.py	Sat Jul 15 00:42:46 2006
@@ -17,14 +17,14 @@
 handler = logging.StreamHandler(stringLog)
 log.setLevel(logging.INFO)
 
-# Set up module-level logger. Found on Google, don't know if this works yet
-# console = logging.StreamHandler()
-# console.setLevel(logging.DEBUG)
-# console.setFormatter(logging.Formatter('%(asctime)s : %(message)s',
-#                                       '%Y-%m-%d %H:%M:%S'))
-# loggerName = None
-# logging.getLogger(loggerName).addHandler(console)
-# del console
+# Set up module-level logger. Found on Google, don't know if this works for sure yet
+console = logging.StreamHandler()
+console.setLevel(logging.INFO)
+console.setFormatter(logging.Formatter('%(asctime)s : %(message)s',
+                                       '%Y-%m-%d %H:%M:%S'))
+loggerName = None
+logging.getLogger(loggerName).addHandler(console)
+del console
 
 # add the handler to the logger
 log.addHandler(handler)


More information about the Python-checkins mailing list