incubator-airflow/airflow/utils/log
Ash Berlin-Taylor 37b2679112
Make `airflow --help` run five times quicker (#12836)
Importing anything from airflow.models pulls in _a lot_ of airflow, so
delay imports until the functions are called, or make use of the
`TYPE_CHECKING` to not actually import at runtime.

**Before**: mean 2.58s (with a lot of variance)
```
airflow ❯ for i in 1 2 3; do time airflow --help >/dev/null; done
airflow --help > /dev/null  2.00s user 1.39s system 176% cpu 1.928 total
airflow --help > /dev/null  2.84s user 1.43s system 151% cpu 2.817 total
airflow --help > /dev/null  3.00s user 1.37s system 145% cpu 3.009 total

```

**After**: 0.526s

```
airflow --help > /dev/null  0.39s user 0.04s system 99% cpu 0.435 total
airflow --help > /dev/null  0.40s user 0.05s system 99% cpu 0.446 total
airflow --help > /dev/null  0.64s user 0.05s system 99% cpu 0.698 total
```

This also has an advantage in development where a syntax error doesn't
fail with a slightly confusing error message about "unable to configure
logger 'task'".
2020-12-05 21:56:25 +00:00
..
__init__.py
cloudwatch_task_handler.py
colored_log.py Change DEBUG color to green in coloured logger (#12784) 2020-12-03 16:07:43 +01:00
es_task_handler.py
file_processor_handler.py Simplify string expressions (#12093) 2020-11-04 18:31:08 +01:00
file_task_handler.py Make `airflow --help` run five times quicker (#12836) 2020-12-05 21:56:25 +00:00
gcs_task_handler.py
json_formatter.py
log_reader.py
logging_mixin.py Simplify string expressions (#12093) 2020-11-04 18:31:08 +01:00
s3_task_handler.py
stackdriver_task_handler.py
task_handler_with_custom_formatter.py
wasb_task_handler.py