Docker: Logs Output

Docker only logs STDOUT and STDERR from PID 1.

docker logs <container-id | container-name>
docker logs -f <container-id | container-name>

Sending stuff to STDOUT and STDERR of PID n:

echo "hello" > /proc/<n>/fd/1 # STDOUT
echo "hello" > /proc/<n>/fd/2 # STDERR

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *