diff sat/core/constants.py @ 3127:2798c86412e1

android: deactivate annoying jnius logs when DEBUG is set
author Goffi <goffi@goffi.org>
date Mon, 27 Jan 2020 19:52:46 +0100
parents 4f8bdf50593f
children 9d0df638c8b4
line wrap: on
line diff
--- a/sat/core/constants.py	Sun Jan 26 18:08:10 2020 +0100
+++ b/sat/core/constants.py	Mon Jan 27 19:52:46 2020 +0100
@@ -424,6 +424,11 @@
         import os.path
         from jnius import autoclass
 
+        # we don't want the very verbose jnius log when we are in DEBUG level
+        import logging
+        logging.getLogger('jnius').setLevel(logging.WARNING)
+        logging.getLogger('jnius.reflect').setLevel(logging.WARNING)
+
         Environment = autoclass("android.os.Environment")
 
         BaseDirectory = None