Add some code for silencing some of kivy's loggin
authorNeil <neil@dip.sun.ac.za>
Sun, 14 Apr 2013 14:05:14 +0000 (16:05 +0200)
committerNeil <neil@dip.sun.ac.za>
Sun, 14 Apr 2013 14:05:14 +0000 (16:05 +0200)
erdslangetjie/editor/editor.py

index ffff296f3d235c6ff6a8931363807a96b7e6a566..998ad4057e90e4d4c3ea4b0cfad29a9e3eb42474 100644 (file)
@@ -6,6 +6,7 @@ from erdslangetjie.data import filepath, load
 kivy.require('1.6.0')
 
 from kivy.app import App
+from kivy.logger import Logger, LoggerHistory
 from kivy.uix.widget import Widget
 
 
@@ -43,6 +44,10 @@ def main():
         level = sys.argv[1]
     else:
         level = 'level1.txt'
+    # Uncomment to silence excessive logging
+    #for hdlr in Logger.handlers[:]:
+    #    if not isinstance(hdlr, LoggerHistory):
+    #        Logger.removeHandler(hdlr)
     EditorApp(level).run()