fix: default logging (#27777)

This commit is contained in:
Jessie R
2024-06-26 03:25:21 +07:00
committed by GitHub
parent dffad48504
commit d74d3a87bb
3 changed files with 5 additions and 13 deletions

View File

@@ -41,17 +41,7 @@ class DefaultLoggingConfigurator( # pylint: disable=too-few-public-methods
if app_config["SILENCE_FAB"]:
logging.getLogger("flask_appbuilder").setLevel(logging.ERROR)
# configure superset app logger
superset_logger = logging.getLogger("superset")
if debug_mode:
superset_logger.setLevel(logging.DEBUG)
else:
# In production mode, add log handler to sys.stderr.
superset_logger.addHandler(logging.StreamHandler())
superset_logger.setLevel(logging.INFO)
logging.getLogger("pyhive.presto").setLevel(logging.INFO)
# basicConfig() will set up a default StreamHandler on stderr
logging.basicConfig(format=app_config["LOG_FORMAT"])
logging.getLogger().setLevel(app_config["LOG_LEVEL"])