diff libervia.py @ 440:88461e9c3e47

browser_side (log): move logging configuration in a "logging" module + use custom backend with console.debug/info/etc output.
author Goffi <goffi@goffi.org>
date Thu, 08 May 2014 19:13:56 +0200
parents d52f529a6d42
children 17259c2ff96f
line wrap: on
line diff
--- a/libervia.py	Thu May 08 17:21:34 2014 +0200
+++ b/libervia.py	Thu May 08 19:13:56 2014 +0200
@@ -19,16 +19,10 @@
 
 import pyjd  # this is dummy in pyjs
 
-from constants import Const as C
 ### logging configuration ###
-from sat.core.log import configure, getLogger
-configure(C.LOG_BACKEND_BASIC,
-          level = C.LOG_LVL_DEBUG,
-          fmt = '[%(name)s / %(levelname)s] %(message)s',
-          output = None,
-          logger = None,
-          colors = False,
-          force_colors = False)
+from browser_side import logging
+logging.configure()
+from sat.core.log import getLogger
 log = getLogger(__name__)
 ###
 
@@ -52,6 +46,7 @@
 from sat_frontends.tools.misc import InputHistory
 from sat_frontends.tools.strings import getURLParams
 from sat.core.i18n import _
+from constants import Const as C
 
 
 MAX_MBLOG_CACHE = 500  # Max microblog entries kept in memories