diff src/core/sat_main.py @ 991:05e02f8b7eb4

core: logging refactoring, first step: - added a core.log module - 3 backends can be used: basic, standard (python's logging module) or twisted - colors can be used - the module has been made to be used by frontends, it should work in exotic environments like pyjamas - logging basic configuration is now made in sat.tac - core.log configuration is inspired from python standard logging, and use it when possible - getLogger should be used the same way as for standard logging
author Goffi <goffi@goffi.org>
date Sat, 19 Apr 2014 00:02:38 +0200
parents 3a96920c07b7
children 301b342c697a
line wrap: on
line diff
--- a/src/core/sat_main.py	Fri Apr 18 23:36:52 2014 +0200
+++ b/src/core/sat_main.py	Sat Apr 19 00:02:38 2014 +0200
@@ -20,14 +20,10 @@
 from sat.core.i18n import _, languageSwitch
 from twisted.application import service
 from twisted.internet import defer
-
 from twisted.words.protocols.jabber import jid, xmlstream
 from twisted.words.xish import domish
-
 from twisted.internet import reactor
-
 from wokkel.xmppim import RosterItem
-
 from sat.bridge.DBus import DBusBridge
 import logging
 from logging import debug, info, warning, error
@@ -49,10 +45,6 @@
 except ImportError:
     from ordereddict import OrderedDict
 
-### logging configuration FIXME: put this elsewhere ###
-logging.basicConfig(level=logging.DEBUG,
-                    format='%(message)s')
-###
 
 sat_id = 0