X-Git-Url: https://svn.cri.ensmp.fr/git/minwii.git/blobdiff_plain/dc8216d3cd94fe2a5d89c6e8a4fae5de2f25bc9b..778427f99b8ef872b62311cabd40a3c0e24bebde:/src/app/log.py diff --git a/src/app/log.py b/src/app/log.py index f07e3d2..c1e3286 100755 --- a/src/app/log.py +++ b/src/app/log.py @@ -22,7 +22,7 @@ hiddenEvents = {pygame.MOUSEMOTION:True, class EventLoggerAdapter(logging.LoggerAdapter) : - FORMAT = "%(ticks)-10s %(eventName)-15s %(message)s" + FORMAT = "EVT %(ticks)-10s %(eventName)-15s %(message)s" def process(self, msg, kwargs) : pp = pprinters.get(msg.type, lambda e: str(e)) @@ -44,7 +44,9 @@ class EventFilter : #logging.basicConfig(level=logging.DEBUG, stream = sys.stdout) console = logging.getLogger('minwii.console') console.setLevel(logging.DEBUG) -console.addHandler(logging.StreamHandler()) +handler = logging.StreamHandler() +handler.setFormatter(logging.Formatter('APP %(message)s')) +console.addHandler(handler) _eventLogger = logging.getLogger('minwii.events') _eventLogger.setLevel(logging.INFO)