This is an automated email from the ASF dual-hosted git repository. potiuk pushed a commit to branch v2-0-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 656a46792363850dfce93e8a0fce7351947f248c Author: Jarek Potiuk <[email protected]> AuthorDate: Fri Feb 26 21:49:56 2021 +0100 Log all breeze output to a file automatically (#14470) (cherry picked from commit 4a54292b69bb9a68a354c34246f019331270df3d) --- BREEZE.rst | 2 ++ breeze | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/BREEZE.rst b/BREEZE.rst index f4689ba..730d6a1 100644 --- a/BREEZE.rst +++ b/BREEZE.rst @@ -36,6 +36,8 @@ We called it *Airflow Breeze* as **It's a Breeze to contribute to Airflow**. The advantages and disadvantages of using the Breeze environment vs. other ways of testing Airflow are described in `CONTRIBUTING.rst <CONTRIBUTING.rst#integration-test-development-environment>`_. +All the output from the last ./breeze command is automatically logged to the ``logs/breeze.out`` file. + Watch the video below about Airflow Breeze. It explains the motivation for Breeze and screencasts all its uses. diff --git a/breeze b/breeze index c5d420b..124ed85 100755 --- a/breeze +++ b/breeze @@ -18,10 +18,20 @@ # under the License. set -euo pipefail + AIRFLOW_SOURCES="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +if [[ ${BREEZE_REDIRECT=} == "" ]]; then + mkdir -p "${AIRFLOW_SOURCES}"/logs + export BREEZE_REDIRECT="true" + "${0}" "${@}" 2>&1 | tee "${AIRFLOW_SOURCES}"/logs/breeze.out + exit +fi + export AIRFLOW_SOURCES readonly AIRFLOW_SOURCES + # Bash arrays need to be defined outside of functions unfortunately :( # Because on Mac OS Bash 3.4 defining arrays inside functions does not work # Array with extra options for Docker compose
