diff src/sat.tac @ 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 1fe00f0c9a91
children 652c01ca69b1
line wrap: on
line diff
--- a/src/sat.tac	Fri Apr 18 23:36:52 2014 +0200
+++ b/src/sat.tac	Sat Apr 19 00:02:38 2014 +0200
@@ -21,6 +21,10 @@
 from twisted.internet import glib2reactor
 glib2reactor.install()
 
+from sat.core.constants import Const as C
+from sat.core import log
+log.configure(C.LOG_BACKEND_TWISTED)
+
 from sat.core.sat_main import SAT
 
 application = service.Application('SàT')