JSON formatter functionality #40754
Replies: 1 comment 6 replies
-
Just to set your expectations - You are mainly on your own, I think such use -case was never foreseen and It is not likely to work as the UI has a number of assumptions about streaming the logs and where it reads them - you will have to dig deeper and understand (rather complex) airflow logging system if you want to modify it, but I think what you are trying to do is a bad idea - things will continue breaking with newer versions of airflow, so you are probably better off with doing it differently rather than modifying Airflow UI. Your starting point is here https://airflow.apache.org/docs/apache-airflow/stable/administration-and-deployment/logging-monitoring/advanced-logging-configuration.html but you will need to dig deep in airflow logging code |
Beta Was this translation helpful? Give feedback.
-
Hello everyone..I am new to airflow so I am not sure if this exists but from my own research I was not able to find it so please free to let me know if I am missing something
I want the airflow logs to be in JSON. I can see a config in the elasticsearch section which is to format logs in JSON but I am not using ES so setting that doesn't work for me. I have seen some solutions using customer logging mechanism to achieve the same, but there is no solid implementation of it or the guide to do so. I want the logs to be displayed in JSON in the UI and also in the files.
Any help in appreciated.
I tried implementing a custom formatter, but for some reason airflow is not picking that up and displaying the logs in the UI as it is. I want the logs displayed in the UI in JSON too.
Beta Was this translation helpful? Give feedback.
All reactions