mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
fix: silence deprecation warnings causing noisy production logs (#38128)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -45,6 +45,13 @@ class DefaultLoggingConfigurator( # pylint: disable=too-few-public-methods
|
||||
logging.basicConfig(format=app_config["LOG_FORMAT"])
|
||||
logging.getLogger().setLevel(app_config["LOG_LEVEL"])
|
||||
|
||||
# Route Python warnings through the logging framework so they get
|
||||
# proper log-level formatting instead of raw stderr output. Without
|
||||
# this, the warnings module writes multi-line text to stderr where
|
||||
# the source-code context line has no level prefix, causing log
|
||||
# aggregators to misclassify it as an error.
|
||||
logging.captureWarnings(True)
|
||||
|
||||
if app_config["ENABLE_TIME_ROTATE"]:
|
||||
logging.getLogger().setLevel(app_config["TIME_ROTATE_LOG_LEVEL"])
|
||||
handler = TimedRotatingFileHandler(
|
||||
|
||||
@@ -54,5 +54,5 @@ def resample(
|
||||
else:
|
||||
_df = getattr(df.resample(rule), method)()
|
||||
if method in ("ffill", "bfill"):
|
||||
_df = _df.fillna(method=method)
|
||||
_df = getattr(_df, method)()
|
||||
return _df
|
||||
|
||||
Reference in New Issue
Block a user