
Chapter 10
Log System Configuration
10.1 Introduction
The Rhino SLEE uses the Apache Log4J logging architecture (
http://logging.apache.org/
) to provide logging facilities to
the internet SLEE components and deployed services. This chapter explains how to set up the Log4J environment and examine
debugging messages.
SLEE application components can use the Trace facility provided by the SLEE for logging facilities. The Trace facility is
defined in the SLEE 1.0 specification, and Trace messages are converted to Log4J messages using the NotificationRecorder
MBean.
10.1.1 Log Keys
Subsystems within the Rhino SLEE send logger messages to various appropriate logger keys. An example logger key is
"rhino.facility.alarm", which periodically receives messages about which alarms are currently active within the Rhino SLEE.
Logger keys are hierarchical. Parent keys receive all messages that are sent to child keys. For example, the key "rhino.facility"
is a parent of "rhino.facility.alarms" and so it receives all messages destined to the "rhino.facility.alarms" key.
The root logger key is aptly called "root". To get a list of all logger keys, one could use the "listLogKeys" command in the
Command Console.
10.1.2 Log Levels
Log Levels determine how much information is sent to the logs from within the Rhino SLEE. A log level can be set for each
logger key.
If a logger does not have a log level assigned to it, then it inherits its log level from its parent. By default, the root logger is
configured to the
INFO
log level. In this way, all keys will output log messages at the
INFO
log level or above unless explicitly
configured otherwise.
Note that a lot of useful or crucial information is output at the
INFO
log level. Because of this, setting logger levels to
WARN
,
ERROR
or
FATAL
is not recommended.
Table 10.1 lists the logger levels that control logger cut-off filtering.
10.2 Appender Types
After being filtered by logger keys, logger messages are sent to Appenders. Appenders will append log messages to whatever
they’re configured to append to, such as files, sockets or the Unix syslogd daemon. Typically, an administrator is interested in
file appenders which output log messages to a set of rolling files.
The actual messages that each appender receives is determined by the loggers
AppenderRefs
.
70
Commenti su questo manuale