Python/BLIP.py
changeset 57 998dcacd4983
parent 54 6d1392a3e0a6
child 58 6577813acf12
     1.1 --- a/Python/BLIP.py	Tue Jun 23 13:52:28 2009 -0700
     1.2 +++ b/Python/BLIP.py	Thu Jul 02 20:45:11 2009 -0700
     1.3 @@ -45,8 +45,14 @@
     1.4  kMsgProfile_Hi      = "Hi"
     1.5  kMsgProfile_Bye     = "Bye"
     1.6  
     1.7 +# Logging Setup
     1.8 +class NullLoggingHandler(logging.Handler):
     1.9 +    def emit(self, record):
    1.10 +        pass
    1.11  
    1.12  log = logging.getLogger('BLIP')
    1.13 +# This line prevents the "No handlers found" warning if the calling code does not use logging.
    1.14 +log.addHandler(NullLoggingHandler())
    1.15  log.propagate = True
    1.16  
    1.17