The Logging Management MBean Rhino SLEE allows changes to logging configuration at runtime. This is useful for capturing log information to diagnose a problem, without having to restart the SLEE. You configure logging using the Logging Management MBean, through the command console. This MBean lets you query the log configuration, and for most subsystems effect immediate changes (some require a node restart for performance reasons).
Subsystems within the Rhino SLEE send log messages to specific loggers. For example, the rhino.facility.alarm logger periodically receives messages about which alarms are currently active within the Rhino SLEE.
Examples of logger names include:
root — the root logger, from which all loggers are derived (can be used to change the log level for all loggers at once)
rhino — main Rhino logger
rhino.management — for log messages related to Rhino management systems
trace.<tracer name> — loggers used by deployed SLEE components that use tracers.
Log levels can be assigned to individual loggers to filter how much information the SLEE produces:
No messages sent to logs (not recommended).
Error messages for unrecoverable errors only (not recommended).
Error messages (not recommended).
Informational messages (especially during node startup or deployment of new resource adaptors or services). The default.
All log messages. Used for debugging by OpenCloud Rhino SLEE developers.
Each log level will log all messages for that log level and above. For example, if a logger is set to the INFO level (the default), all of the log messages logged at the INFO, WARN, ERROR, and FATAL levels will be logged as well.
If a logger is not assigned a log level, it inherits its parent's. For example, if the 'rhino.management' logger has not been assigned a log level, it will have the same effective log level as the 'rhino' logger.
The root logger is a special logger which is considered the parent of all other loggers. By default, the root logger is configured with the INFO log level. In this way, all other logger will output log messages at the INFO log level or above unless explicitly configured otherwise.
Use INFO A lot of useful or crucial information is output at the INFO log level. Because of this, setting log levels to WARN, ERROR or FATAL is not recommended.
System administrators can use the console to create log appenders. These append log messages to destinations such as the console, a log file, socket, or Unix syslog daemon. At runtime, when Rhino logs a message (as permitted by the log level of the associated logger), Rhino sends the message to the log appender for writing. Types of log appenders include:
console appenders — which send messages to the Rhino console
custom appenders — which you configure to receive only messages for particular loggers.
Rolling file appenders
Typically, to manage disk usage, administrators are interested in sending log messages to a set of rolling files. They do this by setting up rolling file appenders which:
create new log files if the current one gets too large
rename old log files as numbered backups
delete old logs when a certain number of them have been archived.
(You can configure the size and number of rolled-over log files.)
By default, the Rhino SLEE comes configured with the following appenders active:
Where it sends messages
Type of appender
the Rhino logs directory (work/log/rhino.log)
a rolling file appender
the Rhino console where a node is running (in a standard error stream)
a console appender
a rolling file appender
New appenders won't receive messages until associated with at least one logger By default, a newly created log appender is not associated with any loggers, so will not receive any log messages.
If a logger has its additivity flag set to true, all of the output of its log statements goes to all of its appenders and ancestors. If a specific ancestor has its additivity flag set to false, then the output goes to all appenders and ancestors up to and including that specific ancestor — but not to appenders in any of that ancestor's ancestors. (By default, logger additivity flags are set to true.}