This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 894741e311 Change log level of serialization information (#30239)
894741e311 is described below
commit 894741e311ffd642e036b80d3b1b5d53c3747cad
Author: Jarek Potiuk <[email protected]>
AuthorDate: Wed Mar 22 15:44:10 2023 +0100
Change log level of serialization information (#30239)
The #30094 introduced info log on how long serialization takes, and
coupled with the fact that serialization register() function
is called by just importing the serde module it caused a potential
of breaking airflow CLI method that produce formatted output
(with `--output` flag with json format).
Those methods block warnings and logs, but only after initial
CLI parsing is complete and the right CLI method is selected
(with @suppress_logs_and_warnings). However in case serde module
is imported before, default "info" log level might cause the log
to be printed before it has been blocked.
The log level seemed to be left here by mistake (it's not a good
practice to log anything at import time), so changing it to debug
seems appropriate.
---
airflow/serialization/serde.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/airflow/serialization/serde.py b/airflow/serialization/serde.py
index 55d63ca170..3429c75f86 100644
--- a/airflow/serialization/serde.py
+++ b/airflow/serialization/serde.py
@@ -332,7 +332,7 @@ def _register():
log.debug("registering %s for stringifying", c)
_stringifiers[c] = name
- log.info("loading serializers took %.3f seconds", timer.duration)
+ log.debug("loading serializers took %.3f seconds", timer.duration)
@functools.lru_cache(maxsize=None)