airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] danmactough commented on a change in pull request #3435: [AIRFLOW-2539] OS Environment variable for logging FILENAME_TEMPLATE
Date Sun, 23 Sep 2018 03:10:22 GMT
danmactough commented on a change in pull request #3435: [AIRFLOW-2539] OS Environment variable
for logging FILENAME_TEMPLATE
URL: https://github.com/apache/incubator-airflow/pull/3435#discussion_r219687143
 
 

 ##########
 File path: airflow/config_templates/default_airflow.cfg
 ##########
 @@ -61,9 +62,15 @@ logging_level = INFO
 logging_config_class =
 
 # Log format
+# we need to escape the curly braces by adding an additional curly brace
 log_format = [%%(asctime)s] {{%%(filename)s:%%(lineno)d}} %%(levelname)s - %%(message)s
 simple_log_format = %%(asctime)s %%(levelname)s - %%(message)s
 
+# Log filename format
+# we need to escape the curly braces by adding an additional curly brace
+log_filename_template = {{{{ ti.dag_id }}}}/{{{{ ti.task_id }}}}/{{{{ ts }}}}/{{{{ try_number
}}}}.log
+log_processor_filename_template = {{{{ filename }}}}.log
 
 Review comment:
   @Fokko @NielsZeilemaker I finally figured out what is going on here, and it's not a bug.
😬 Those strings with additional curly braces end up getting parsed as template strings,
formatted, and written out in `airflow.cfg`. So the source default config has to contain something
like `{{{{ filename }}}}.log` in order to get the corresponding entry in `airflow.cfg` to
be `{{ filename }}.log`. 
   
   Sorry for the false alarm.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message