Book Image

Wildfly Cookbook

Book Image

Wildfly Cookbook

Overview of this book

Table of Contents (23 chapters)
WildFly Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Logging WildFly outside Docker


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.

Getting ready

To be able to follow this recipe, you need to have followed the previous one, which is about running WildFly in Docker.

How to do it…

First of all, we need to create a directory on the host to store our logs, and enable the container-writable permissions to...