mik-laj commented on a change in pull request #6622: [AIRLFOW-6024] Do not use
the logger in CLI
URL: https://github.com/apache/airflow/pull/6622#discussion_r349270843
##########
File path: airflow/cli/commands/dag_command.py
##########
@@ -104,16 +104,15 @@ def dag_trigger(args):
:return:
"""
api_client = get_current_api_client()
- log = LoggingMixin().log
try:
message = api_client.trigger_dag(dag_id=args.dag_id,
run_id=args.run_id,
conf=args.conf,
execution_date=args.exec_date)
+ print(message)
except OSError as err:
- log.error(err)
+ print(str(err))
raise AirflowException(err)
Review comment:
Fixed. Raising exceptions is also not the best solution, but it is another
problem.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services