Looking at logs

You might be tempted to think about server logs with the same enthusiasm that you would have approached a college course in financial accounting: probably useful, but definitely boring.

Don't fall into this trap. The server logs are a gold mine of useful information. You'll see in the logs the results of both successful and failed operations. We'll be examining server logs in detail as we work through the examples in this book.

Let's start by finding the logs.

Finding the logs

You saw a lot of logging information displayed on the screen when you started the server a few minutes ago. The problem with this information, however, is that it scrolled by faster than anyone could read and analyze it. Fear not. The same information, and actually, more information, was also written to log files.

Within the all server profile, you'll see a log directory. This directory contains the following log files:

  • boot.log: This shows the actual boot sequence followed by the server.
  • server.log: The primary server log file which tracks the lifecycle of managed resources as well as output and error messages written from those resources. The JBoss ESB logger is based on Apache log4j (http://logging.apache.org/log4j/). The level of detail written to the server.log is configurable in each server's jboss-log4j.xml file.

The degree of detail of information that is written to the logs is defined in the server/[profile]/conf/jboss-log4j.xml file as JBoss AS and ESB make use of the Java Log4J library. Log4J defines:

  • Appenders that enable you to have logging messages sent to a console or different files
  • Log message levels such as INFO, WARNING, ERROR, DEBUG, and FATAL
  • Categories that enable you to filter log messages based on a package

We found the logs. Well, this was pretty easy, seeing as how they are in the logs directory. But, seriously, make a mental note as to the location of the logs as you will be returning to them frequently to diagnose problems, or to confirm that your server is running as expected.

What sort of things can you see in the server.log? Here's a simple example. Remember how we described the .esb archives that were added to the server when we deployed JBoss ESB? Let's look to see if they were initialized successfully when the server was started.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.131.168