-#logging.basicConfig(level=logging.DEBUG, stream = sys.stdout)
-console = logging.getLogger('minwii.console')
-console.setLevel(logging.DEBUG)
-console.addHandler(logging.StreamHandler())
-
-_eventLogger = logging.getLogger('minwii.events')
-_eventLogger.setLevel(logging.INFO)
-_eventHandler = logging.StreamHandler()
-_eventFormatter = logging.Formatter(EventLoggerAdapter.FORMAT)
-_eventHandler.setFormatter(_eventFormatter)
-_eventLogger.addHandler(_eventHandler)
-_eventLogger.addFilter(EventFilter())
-
-eventLogger = EventLoggerAdapter(_eventLogger, {})
-#eventLogger = logging.getLogger('minwii.events')
+
+def initAppConsole() :
+ global console
+ console = logging.getLogger('minwii.console')
+ console.setLevel(logging.DEBUG)
+ handler = MinWiiStreamHandler()
+ handler.setFormatter(logging.Formatter('APP %(message)s'))
+ console.addHandler(handler)
+
+def initEnvLogger() :
+ global envLogger
+ envLogger = logging.getLogger('minwii.env')
+ envLogger.setLevel(logging.DEBUG)
+ handler = MinWiiStreamHandler()
+ handler.setFormatter(logging.Formatter('ENV %(message)s'))
+ envLogger.addHandler(handler)
+
+
+def initEventLogger():
+ _eventLogger = logging.getLogger('minwii.events')
+ _eventLogger.setLevel(logging.INFO)
+ _eventHandler = MinWiiStreamHandler()
+ _eventFormatter = logging.Formatter(EventLoggerAdapter.FORMAT)
+ _eventHandler.setFormatter(_eventFormatter)
+ _eventLogger.addHandler(_eventHandler)
+ _eventLogger.addFilter(EventFilter())
+ global eventLogger
+ eventLogger = EventLoggerAdapter(_eventLogger, {})
+
+def initLoggers() :
+ initAppConsole()
+ initEnvLogger()
+ initEventLogger()
+
+initLoggers()