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: '')
+ pp = pprinters.get(msg.type, lambda e: str(e))
extra = {}
extra['eventType'] = msg.type
extra['eventName'] = eventNames[msg.type]
#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)