[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] Making the logging NullHandler private



commit f31b19b966bc2f1243f58eebf8a1db0ce2876ff0
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Sun Oct 28 13:49:17 2012 -0700

    Making the logging NullHandler private
    
    We have a null logging handler to avoid having the logging module give a
    warning about no handlers being present. There's no reason for stem's users to
    care about it so making it private.
---
 stem/util/log.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/stem/util/log.py b/stem/util/log.py
index fbb8fdc..62b2bbc 100644
--- a/stem/util/log.py
+++ b/stem/util/log.py
@@ -69,11 +69,11 @@ DEDUPLICATION_MESSAGE_IDS = set()
 # could be found for logger "stem"' warning as per...
 # http://docs.python.org/release/3.1.3/library/logging.html#configuring-logging-for-a-library
 
-class NullHandler(logging.Handler):
+class _NullHandler(logging.Handler):
   def emit(self, record): pass
 
 if not LOGGER.handlers:
-  LOGGER.addHandler(NullHandler())
+  LOGGER.addHandler(_NullHandler())
 
 def get_logger():
   """



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits