[
https://issues.apache.org/jira/browse/AIRFLOW-7078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17063580#comment-17063580
]
Oleg Korsak commented on AIRFLOW-7078:
--------------------------------------
Same DAG running in 1.10.9:
{noformat}
*** Log file does not exist:
/usr/local/airflow/logs/aaa_test_logging/aaa_test_logging/2020-03-20T16:14:43.180976+00:00/1.log
*** Fetching from:
http://airflow-worker-3.airflow-worker.svc.cluster.local:8793/log/aaa_test_logging/aaa_test_logging/2020-03-20T16:14:43.180976+00:00/1.log
[2020-03-20 16:14:49,233] {taskinstance.py:655} INFO - Dependencies all met for
<TaskInstance: aaa_test_logging.aaa_test_logging
2020-03-20T16:14:43.180976+00:00 [queued]>
[2020-03-20 16:14:49,254] {taskinstance.py:655} INFO - Dependencies all met for
<TaskInstance: aaa_test_logging.aaa_test_logging
2020-03-20T16:14:43.180976+00:00 [queued]>
[2020-03-20 16:14:49,254] {taskinstance.py:866} INFO -
--------------------------------------------------------------------------------
[2020-03-20 16:14:49,254] {taskinstance.py:867} INFO - Starting attempt 1 of 4
[2020-03-20 16:14:49,254] {taskinstance.py:868} INFO -
--------------------------------------------------------------------------------
[2020-03-20 16:14:49,271] {taskinstance.py:887} INFO - Executing
<Task(PythonOperator): aaa_test_logging> on 2020-03-20T16:14:43.180976+00:00
[2020-03-20 16:14:49,275] {standard_task_runner.py:53} INFO - Started process
76 to run task
[2020-03-20 16:14:49,342] {logging_mixin.py:112} INFO - Running %s on host %s
<TaskInstance: aaa_test_logging.aaa_test_logging
2020-03-20T16:14:43.180976+00:00 [running]>
airflow-worker-3.airflow-worker.svc.cluster.local
[2020-03-20 16:19:49,453] {python_operator.py:114} INFO - Done. Returned value
was: None
[2020-03-20 16:19:49,465] {taskinstance.py:1048} INFO - Marking task as
SUCCESS.dag_id=aaa_test_logging, task_id=aaa_test_logging,
execution_date=20200320T161443, start_date=20200320T161449,
end_date=20200320T161949
{noformat}
> logger / print gets overwritten with custom Operator after version upgrade
> --------------------------------------------------------------------------
>
> Key: AIRFLOW-7078
> URL: https://issues.apache.org/jira/browse/AIRFLOW-7078
> Project: Apache Airflow
> Issue Type: Bug
> Components: logging
> Affects Versions: 1.10.9
> Reporter: seth
> Priority: Major
> Attachments: airflow_post.PNG, airflow_pre.PNG
>
>
> Hi, I have customized `AWSAthenaOperator` to both log the executed query, and
> log the query_id.
> I am using a simple print statement, which should be logged as INFO by the
> logger
> After upgrade to airflow==1.10.9 these logs are not persisted anymore, and in
> fact seems to be overwritten.
> I'm attaching 2 screenshots, 1 of the log output while the task is still
> running. As you can see, the expected output is present in the logs.
> The 2nd, the log is taken after the task has completed successfully .
--
This message was sent by Atlassian Jira
(v8.3.4#803005)