Troubadour
Troubadour

Reputation: 1

Scheduler logs different between airflow1 and airflow2

Because I can't use the airflow CLI, I'm actually parsing scheduler logs with grep on airflow1 in order to retrieve some infos such as :

[2021-12-01 11:06:50,340] {logging_mixin.py:112} INFO - [2021-12-01 11:06:50,339] {dagrun.py:307} INFO - Marking run <DagRun prd_*** @ 2021-12-01 10:02:00+00:00: scheduled__2021-12-01T10:02:00+00:00, externally triggered: False>successful

[2021-12-01 11:04:49,213] {scheduler_job.py:1298} INFO - Created <DagRun prd_*** @ 2021-12-01T10:02:00+00:00: scheduled__2021-12-01T10:02:00+00:00, externally triggered: False>

It works well on airflow1 but I can't find those data in the airflow2 scheduler logs after migration.

Does the configuration need to be changed ?

Regards, Troubadour

Upvotes: 0

Views: 177

Answers (1)

Jarek Potiuk
Jarek Potiuk

Reputation: 20097

You should use Airflow 2 REST API instead.

It was precisely done so that you do not have to parse logs. https://airflow.apache.org/docs/apache-airflow/stable/stable-rest-api-ref.html

Upvotes: 0

Related Questions