comparison 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
comparison
equal deleted inserted replaced
439:d52f529a6d42 440:88461e9c3e47
17 # You should have received a copy of the GNU Affero General Public License 17 # You should have received a copy of the GNU Affero General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. 18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 19
20 import pyjd # this is dummy in pyjs 20 import pyjd # this is dummy in pyjs
21 21
22 from constants import Const as C
23 ### logging configuration ### 22 ### logging configuration ###
24 from sat.core.log import configure, getLogger 23 from browser_side import logging
25 configure(C.LOG_BACKEND_BASIC, 24 logging.configure()
26 level = C.LOG_LVL_DEBUG, 25 from sat.core.log import getLogger
27 fmt = '[%(name)s / %(levelname)s] %(message)s',
28 output = None,
29 logger = None,
30 colors = False,
31 force_colors = False)
32 log = getLogger(__name__) 26 log = getLogger(__name__)
33 ### 27 ###
34 28
35 from pyjamas.ui.RootPanel import RootPanel 29 from pyjamas.ui.RootPanel import RootPanel
36 from pyjamas.ui.HTML import HTML 30 from pyjamas.ui.HTML import HTML
50 from browser_side.notification import Notification 44 from browser_side.notification import Notification
51 45
52 from sat_frontends.tools.misc import InputHistory 46 from sat_frontends.tools.misc import InputHistory
53 from sat_frontends.tools.strings import getURLParams 47 from sat_frontends.tools.strings import getURLParams
54 from sat.core.i18n import _ 48 from sat.core.i18n import _
49 from constants import Const as C
55 50
56 51
57 MAX_MBLOG_CACHE = 500 # Max microblog entries kept in memories 52 MAX_MBLOG_CACHE = 500 # Max microblog entries kept in memories
58 53
59 # Set to true to not create a new LiberviaWidget when a similar one 54 # Set to true to not create a new LiberviaWidget when a similar one