pastushenkoy opened a new issue, #22842:
URL: https://github.com/apache/airflow/issues/22842
### Apache Airflow version
2.2.5 (latest released)
### What happened
When I start airflow in official docker container with command:
```
docker run \
-e AIRFLOW__ELASTICSEARCH__JSON_FORMAT=True \
-e AIRFLOW__ELASTICSEARCH__JSON_FORMAT=True \
-e
AIRFLOW__ELASTICSEARCH__LOG_ID_TEMPLATE="{dag_id}-{task_id}-{run_id}-{try_number}"
\
-e AIRFLOW__ELASTICSEARCH__JSON_FIELDS="asctime, filename, lineno,
levelname, message" \
apache/airflow:2.2.5 webserver
```
I've got the following output:
```
____________ _____________
____ |__( )_________ __/__ /________ __
____ /| |_ /__ ___/_ /_ __ /_ __ \_ | /| / /
___ ___ | / _ / _ __/ _ / / /_/ /_ |/ |/ /
_/_/ |_/_/ /_/ /_/ /_/ \____/____/|__/
[2022-04-07 18:38:08,161] {dagbag.py:500} INFO - Filling up the DagBag from
/dev/null
[2022-04-07 18:38:35,231] {manager.py:512} WARNING - Refused to delete
permission view, assoc with role exists DAG Runs.can_create User
Running the Gunicorn Server with:
Workers: 4 sync
Host: 0.0.0.0:8080
Timeout: 120
Logfiles: - -
Access Logformat:
=================================================================
[2022-04-07 18:40:11 +0000] [29] [INFO] Starting gunicorn 20.1.0
[2022-04-07 18:40:11 +0000] [29] [INFO] Listening at: http://0.0.0.0:8080
(29)
[2022-04-07 18:40:11 +0000] [29] [INFO] Using worker: sync
[2022-04-07 18:40:11 +0000] [38] [INFO] Booting worker with pid: 38
[2022-04-07 18:40:11 +0000] [39] [INFO] Booting worker with pid: 39
[2022-04-07 18:40:11 +0000] [40] [INFO] Booting worker with pid: 40
[2022-04-07 18:40:11 +0000] [41] [INFO] Booting worker with pid: 41
[2022-04-07 18:40:43,975] {manager.py:512} WARNING - Refused to delete
permission view, assoc with role exists DAG Runs.can_create User
[2022-04-07 18:40:43,975] {manager.py:512} WARNING - Refused to delete
permission view, assoc with role exists DAG Runs.can_create User
[2022-04-07 18:40:44,093] {manager.py:512} WARNING - Refused to delete
permission view, assoc with role exists DAG Runs.can_create User
[2022-04-07 18:40:44,095] {manager.py:512} WARNING - Refused to delete
permission view, assoc with role exists DAG Runs.can_create User
```
### What you think should happen instead
I expected to see json logs in Elasticsearch format in console.
### How to reproduce
```
mkdir temp
```
```
cd temp
```
```
docker run -v "$(pwd)":/opt/airflow apache/airflow:2.2.5 db init
```
```
docker run -v "$(pwd)":/opt/airflow \
-e AIRFLOW__ELASTICSEARCH__JSON_FORMAT=True \
-e AIRFLOW__ELASTICSEARCH__JSON_FORMAT=True \
-e
AIRFLOW__ELASTICSEARCH__LOG_ID_TEMPLATE="{dag_id}-{task_id}-{run_id}-{try_number}"
\
-e AIRFLOW__ELASTICSEARCH__JSON_FIELDS="asctime, filename, lineno,
levelname, message" \
apache/airflow:2.2.5 webserver
```
### Operating System
macos 11.2.3
### Versions of Apache Airflow Providers
_No response_
### Deployment
Docker-Compose
### Deployment details
_No response_
### Anything else
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]