You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/10/05 06:26:45 UTC
[GitHub] [airflow] mik-laj commented on issue #9383: Test StackdriverTaskHandler on latest Airflow 1.10
mik-laj commented on issue #9383:
URL: https://github.com/apache/airflow/issues/9383#issuecomment-703425552
Done. It works with ``apache-airflow-backport-providers-google==2020.10.5rc1``, but we need to manually configure the task handler. To do this, create the `~/airflow/config/log_config.py` file with the following content.
```python
from copy import deepcopy
from airflow.config_templates.airflow_local_settings import DEFAULT_LOGGING_CONFIG
from pprint import pprint
LOGGING_CONFIG = deepcopy(DEFAULT_LOGGING_CONFIG)
LOGGING_CONFIG['handlers']['task'] = {
'class': 'stackdriver.StackdriverTaskHandler',
'formatter': 'airflow',
'name': 'aairflow-tasks',
'gcp_key_path': '/key/path.json'
}
```
Details are available in the handler’s documentation - [https://airflow.readthedocs.io/en/latest/_api/airflow/providers/google/cloud/log/stackdriver_task_handler/index.html#airflow.providers.google.cloud.log.stackdriver_task_handler.StackdriverTaskHandler](airflow.providers.google.cloud.log.stackdriver_task_handler.StackdriverTaskHandler).
----------------------------------------------------------------
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:
users@infra.apache.org