Mercurial > libervia-backend
comparison 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 |
comparison
equal
deleted
inserted
replaced
990:f0e407709d8e | 991:05e02f8b7eb4 |
---|---|
19 | 19 |
20 from twisted.application import service | 20 from twisted.application import service |
21 from twisted.internet import glib2reactor | 21 from twisted.internet import glib2reactor |
22 glib2reactor.install() | 22 glib2reactor.install() |
23 | 23 |
24 from sat.core.constants import Const as C | |
25 from sat.core import log | |
26 log.configure(C.LOG_BACKEND_TWISTED) | |
27 | |
24 from sat.core.sat_main import SAT | 28 from sat.core.sat_main import SAT |
25 | 29 |
26 application = service.Application('SàT') | 30 application = service.Application('SàT') |
27 service = SAT() | 31 service = SAT() |
28 service.setServiceParent(application) | 32 service.setServiceParent(application) |