When dealing with an application server, and thus web applications, often we really need to look at the logs. As we have seen in the previous recipe, we have run WildFly in a container and we have looked at the logs automatically because of the terminal flag being enabled (-t
when executing the docker run
command).
Without the terminal flag enabled, we would have needed to access the container (docker attach
CONTAINER_ID
or docker logs CONTAINER_ID
command). That's not the most comfortable way to look at logs, and we would like to store our logs locally, on our host, and group them.
In this recipe, you will learn how to store your application logs outside the container, and store them on the host.
To be able to follow this recipe, you need to have followed the previous one, which is about running WildFly in Docker.