This is an automated email from the ASF dual-hosted git repository.

kaxilnaik pushed a commit to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 8aaa1330d5f6c6ca2f8d852792ff729f91b462ed
Author: Ash Berlin-Taylor <[email protected]>
AuthorDate: Sun Sep 14 03:56:53 2025 +0100

    Add missing `.level` property on our structlog shim. (#55638)
    
    This wasn't caught in unit tests, but it was reported that something within
    Slack's python library itself is trying to access this property.
    
    
https://github.com/slackapi/python-slack-sdk/blob/ed1893d/slack_sdk/socket_mode/client.py#L98
    for example
    
    (cherry picked from commit ee99c6238375494cb226f3019452ac369e0cde92)
---
 shared/logging/src/airflow_shared/logging/structlog.py | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/shared/logging/src/airflow_shared/logging/structlog.py 
b/shared/logging/src/airflow_shared/logging/structlog.py
index bc381dfbc7d..37b65cca1d8 100644
--- a/shared/logging/src/airflow_shared/logging/structlog.py
+++ b/shared/logging/src/airflow_shared/logging/structlog.py
@@ -70,11 +70,9 @@ def _make_airflow_structlogger(min_level):
     def handlers(self):
         return [logging.NullHandler()]
 
-    def isEnabledFor(self: Any, level):
-        return self.is_enabled_for(level)
-
-    def getEffectiveLevel(self: Any):
-        return self.get_effective_level()
+    @property
+    def level(self):
+        return min_level
 
     @property
     def name(self):
@@ -109,8 +107,9 @@ def _make_airflow_structlogger(min_level):
         f"AirflowBoundLoggerFilteringAt{LEVEL_TO_NAME.get(min_level, 
'Notset').capitalize()}",
         (base,),
         {
-            "isEnabledFor": isEnabledFor,
-            "getEffectiveLevel": getEffectiveLevel,
+            "isEnabledFor": base.is_enabled_for,
+            "getEffectiveLevel": base.get_effective_level,
+            "level": level,
             "name": name,
             "handlers": handlers,
         }

Reply via email to