Configuring loggers

Each time a log event is emitted, it contains information about the log level and the fully qualified class name bound to that event. In order to associate this information with a specific handler, you can use loggers.

Loggers are associated with a specific namespace, hence they have a hierarchy that contains, at the root, the root logger that is the ancestor of all loggers. All classes that don't have a configured logger will therefore be captured by the root logger. The root logger by default is associated with the CONSOLE and FILE handlers. You can vary it by specifying the list of Handlers as follows:

/subsystem=logging/root-logger=ROOT/:write-attribute(name=handlers,value=["CONSOLE","FILE","SYSLOG"])

By default, the root ...

Get Mastering JBoss Enterprise Application Platform 7 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.