Chapter 6. Logging
Note
In this chapter:
In this chapter, we are going to look at how JBoss handles logging. JBoss integrates the log4j logging framework as a core service of the application server. This means that JBoss provides not only extensive information about what the application server is doing at any given moment, but also the ability to centrally manage logging for all the applications in the server.
Centralizing log management has several nice benefits. It means that your applications don’t need to worry about incompatible logging libraries. You also don’t have to worry about application-specific logging configurations, or monitoring multiple application-specific logfiles. As a core JBoss service, you also gain the ability to dynamically reconfigure logging in a running server.
Let’s get started and see what log4j can do.
Configuring log4j
The log4j.xml file in the conf directory controls all the logging for the server. This file has the definition of all the appenders that specify the logfiles, the categories of messages going to those logfiles, the layouts (formats) of those messages, and any filtering that will be done on those messages.
Note
For further information on log4j, see http://logging.apache.org.
JBoss keeps two logs. The first is the core ...
Get JBoss: A Developer's Notebook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.