ui.py

changeset 31
b4b4bb7a2ec5
parent 30
3dd525652dc8
child 32
06fc14211ba9
--- a/ui.py	Sun Jan 21 12:10:57 2018 +0000
+++ b/ui.py	Sun Jan 21 13:34:12 2018 +0000
@@ -10,6 +10,8 @@
 from config import settings
 import objc
 
+logger=logging.getLogger(__name__)
+
 INACTIVE=0
 ACTIVE=1
 OFFLINE=2
@@ -146,14 +148,14 @@
     def refresh_ui(self):
         with self.lock:
             self.refresh_timer=None
-            logging.debug('Rebuilding menu')
+            logger.debug('Rebuilding menu')
             menu, active=self.__rebuild_menu()
             self.menu.clear()
             self.menu.update(menu)
             self.title=traynames[active]
 
     def __status_callback(self, obj, index, status, errorlog):
-        logging.debug('Status callbackup %s' % str(status))
+        logger.debug('Status callbackup %s' % str(status))
 
         with self.lock:
             self.statuses[index]=status
@@ -167,7 +169,7 @@
             else:
                 msgid=errorlog['msgid']
 
-            logging.debug('Opening notification for error')
+            logger.debug('Opening notification for error')
 
             # Workaround to rumps brokenness
             # See https://github.com/jaredks/rumps/issues/59
@@ -181,7 +183,7 @@
 
     def __menu_select_backup(self, sender, b):
         #sender.state=not sender.state
-        logging.debug("Manually backup '%s'", b.name)
+        logger.debug("Manually backup '%s'", b.name)
         b.create(None)
 
     @rumps.notifications

mercurial