From e17843c40a9493dc608961089ee70e75d515dcf7 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 20 Apr 2013 19:45:09 +0200 Subject: [PATCH] More kivy'ish way of silencing logging --- erdslangetjie/constants.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 -- 2.34.1