# HG changeset patch # User souliane # Date 1406197236 -7200 # Node ID 516b06787c1a0b21bb7b520049e28b30aafb5743 # Parent 0924710b666a102fcb319764abdb50aef99183f4 browser_side: fix logging issue with older firefox version (e.g. 3.0.4) diff -r 0924710b666a -r 516b06787c1a src/browser/sat_browser/logging.py --- a/src/browser/sat_browser/logging.py Thu Jul 17 12:59:33 2014 +0200 +++ b/src/browser/sat_browser/logging.py Thu Jul 24 12:20:36 2014 +0200 @@ -26,6 +26,14 @@ class LiberviaLogger(log.Logger): def out(self, message, level=None): + try: + console + except: + # XXX: for older Firefox version, the displayed error is "libervia_main ReferenceError: console is not defined" + # but none of the following exception class is working: ReferenceError, TypeError, NameError, Exception... + # it works when you don't explicit a class, tested with Firefox 3.0.4 + print message + return if level == C.LOG_LVL_DEBUG: console.debug(message) elif level == C.LOG_LVL_INFO: