You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "apilaskowski (via GitHub)" <gi...@apache.org> on 2023/04/06 08:25:53 UTC

[GitHub] [airflow] apilaskowski commented on a diff in pull request #30485: Split Celery logs into stdout/stderr

apilaskowski commented on code in PR #30485:
URL: https://github.com/apache/airflow/pull/30485#discussion_r1159456716


##########
airflow/cli/commands/celery_command.py:
##########
@@ -96,6 +99,31 @@ def _serve_logs(skip_serve_logs: bool = False):
         sub_proc.terminate()
 
 
+@after_setup_logger.connect()
+def logger_setup_handler(logger, **kwargs):
+    # Setup levels at which logs go to stderr and stdout if required
+    if conf.has_option("logging", "reset_and_split_logging") and conf.get(
+        "logging", "reset_and_split_logging"
+    ):
+        airflow_formatter = logging.Formatter(conf.get("logging", "log_format"))

Review Comment:
   I think it is this one:
   ```"""[%(asctime)s: %(levelname)s/%(processName)s] %(task_name)s[%(task_id)s]: %(message)s"""```
   From:
   https://github.com/celery/celery/blob/025c1d4f9a1208a9d3bb01b1129a0f48234d3df0/celery/app/defaults.py#L17



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org