Added debug logging around document view creation.
authorPaweł Paprota <ppawel@fastmail.fm>
Sat, 29 Mar 2008 13:53:00 +0000 (29 14:53 +0100)
committerPaweł Paprota <ppawel@fastmail.fm>
Sun, 20 Apr 2008 16:45:48 +0000 (20 18:45 +0200)
straw/ItemView.py

index 9fb2207..8264ff5 100644 (file)
@@ -35,6 +35,8 @@ import straw.defs
 import urlparse
 pygtk.require('2.0')
 
+log = error.get_logger()
+
 class HTMLView(MVP.View):
 
     def _initialize(self):
@@ -240,8 +242,7 @@ class HTMLPresenter(MVP.BasicPresenter):
                     image = ImageCache.cache[url]
                     stream.write(image.get_data())
             except Exception, ex:
-                #error.log("Error reading image in %s: %s" % (url, ex))
-                pass
+                log.error("Error reading image in %s: %s" % (url, ex))
         finally:
             stream.close()
             stream = None
@@ -517,11 +518,18 @@ class ItemView:
 #        widget = gtkhtml2.View()
         import documentviews
         engine_name = os.getenv('STRAW_HTML')
+
+        log.debug("STRAW_HTML = %s" % engine_name)
+
         if engine_name:
             engine = documentviews.create_documentviews[engine_name]
         else:
             engine = documentviews.default_documentview
+
         document = engine(Config.straw_home())
+
+        log.debug("document = %s" % document)
+
         widget = document.widget()
         html_view = HTMLView(widget, document)
         self._html_presenter = HTMLPresenter(document, html_view)