How can I access the Docker log file from INSIDE the container? Why do I need this? Because I am running Wordpress in a Docker container and want to direct debug messages to the Docker log instead of the wp-content/error.log file. Refer:
So I need the path of the Docker log file that I can then enter in:
define( 'WP_DEBUG_LOG', '/tmp/wp-errors.log' );
This link:
seems to suggest this is not possible. Is that really so? How do applications then write to Docker log in the first place?
Find ID of the necessary container via - docker ps
Get inside your container via - docker exec -it YourContainerIdHere sh
Find necessary process via - ps aux
Execute - cat /proc/<PIDofYourProcess>/fd/1