Book Image

OpenShift Cookbook

By : Shekhar Gulati
Book Image

OpenShift Cookbook

By: Shekhar Gulati

Overview of this book

Table of Contents (19 chapters)
OpenShift Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Running OpenShift on a Virtual Machine
Index

Working with JBoss application logs


As mentioned in the Viewing application logs recipe, logs are important data generated by your applications. This recipe will cover in detail how you can work with logs in OpenShift's JBoss cartridge applications. This recipe will start with viewing logs of an existing JBoss application, and then you will add application-specific logging using the SLF4J library. This recipe assumes you have already read the Viewing application logs recipe.

Getting ready

This recipe will use the application created in the Creating and deploying Java EE 6 applications using the JBoss EAP and PostgreSQL 9.2 cartridges recipe in Chapter 7, OpenShift for Java Developers. You can recreate the application using the following command:

$ rhc create-app jobstore jbosseap postgresql-9.2 --from-code https://github.com/OpenShift-Cookbook/chapter7-jobstore-javaee6.git

How to do it…

Perform the following steps:

  1. You can view the JBoss cartridge logs by running the following command:

    $ rhc...