Following Format Airflow Logs in JSON and the guide mentioned in it, I copied log_config to airflow/config folder. But when I run the webserver or scheduler, I get 'module not defined' (init.py was defined in the config folder) And PYTHONPATH was set as airflow/config
Error was
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airflow/logging_config.py", line 40, in configure_logging
logging_config = import_string(logging_class_path)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airflow/utils/module_loading.py", line 33, in import_string
module = import_module(module_path)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'airflow.config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/bin/airflow", line 25, in <module>
from airflow.configuration import conf
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airflow/__init__.py", line 47, in <module>
settings.initialize()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airflow/settings.py", line 374, in initialize
LOGGING_CLASS_PATH = configure_logging()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/airflow/logging_config.py", line 52, in configure_logging
'Unable to load custom logging from {} due to {}'.format(logging_class_path,err), isinstance('airflow',dict), isinstance('airflow.config',dict), type('airflow.config')
ImportError: ("Unable to load custom logging from airflow.config.log_config.LOGGING_CONFIG due to No module named 'airflow.config'",
Now it returns,
ImportError: Unable to load custom logging from airflow.config.log_config.LOGGING_CONFIG due to section/key [logging/logging_level] not found in config