If you want to change PHP-FPM and Nginx container log format to JSON while keeping same style, you can use example below.

Structure

.
├── docker
│   ├── docker-compose.yml
│   ├── Makefile
│   ├── nginx
│   │   ├── app.conf
│   │   ├── Dockerfile
│   │   └── nginx.conf
│   └── php
│       ├── Dockerfile
│       ├── php.ini
│       └── www.conf
└── index.php

#docker #php #nginx

PHP-FPM and Nginx access logs as standardised JSON string in Docker environment
5.10 GEEK