changeset 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 2b0f739f8a46
children 73b5228715e8
files sat/core/constants.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
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