[Sugar-devel] [PATCH] consistent use of _logger.debug throughout

Walter Bender walter at sugarlabs.org
Mon Jul 4 13:16:01 EDT 2011


From: Walter Bender <walter.bender at gmail.com>

There had been a mix of the use of logging.debug and _logger.debug throughout
the code. _logger is now used in all cases.

---
 src/jarabe/view/viewsource.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/jarabe/view/viewsource.py b/src/jarabe/view/viewsource.py
index bbf0be5..e12b546 100644
--- a/src/jarabe/view/viewsource.py
+++ b/src/jarabe/view/viewsource.py
@@ -294,11 +294,11 @@ class DocumentButton(RadioToolButton):
                         error_handler=self.__internal_save_error_cb)
 
     def __internal_save_cb(self):
-        logging.debug('Saved Source object to datastore.')
+        _logger.debug('Saved Source object to datastore.')
         self._jobject.destroy()
 
     def __internal_save_error_cb(self, err):
-        logging.debug('Error saving Source object to datastore: %s', err)
+        _logger.debug('Error saving Source object to datastore: %s', err)
         self._jobject.destroy()
 
 
@@ -509,7 +509,7 @@ class SourceDisplay(gtk.ScrolledWindow):
             return
 
         mime_type = mime.get_for_file(self._file_path)
-        logging.debug('Detected mime type: %r', mime_type)
+        _logger.debug('Detected mime type: %r', mime_type)
 
         language_manager = gtksourceview2.language_manager_get_default()
         detected_language = None
@@ -520,7 +520,7 @@ class SourceDisplay(gtk.ScrolledWindow):
                 break
 
         if detected_language is not None:
-            logging.debug('Detected language: %r',
+            _logger.debug('Detected language: %r',
                     detected_language.get_name())
 
         self._buffer.set_language(detected_language)
-- 
1.7.4.4



More information about the Sugar-devel mailing list