From: Neil Date: Sat, 20 Apr 2013 17:45:09 +0000 (+0200) Subject: More kivy'ish way of silencing logging X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=e17843c40a9493dc608961089ee70e75d515dcf7;p=erdslangetjie.git More kivy'ish way of silencing logging --- diff --git a/erdslangetjie/constants.py b/erdslangetjie/constants.py index c9f16e6..35c2e88 100644 --- a/erdslangetjie/constants.py +++ b/erdslangetjie/constants.py @@ -3,16 +3,15 @@ import kivy kivy.require('1.6.0') from kivy.logger import Logger, LoggerHistory +from kivy.config import Config QUIET = False # kivy logging - change for release if QUIET: - for hdlr in Logger.handlers[:]: - if not isinstance(hdlr, LoggerHistory): - Logger.removeHandler(hdlr) + Config.set('kivy', 'log_enable', 0) + Config.set('kivy', 'log_level', 'critical') from kivy.utils import platform -from kivy.config import Config if platform() != 'android': TILE_SIZE = 38