
>cd $RHINO_HOME
>./client/bin/rhino-console
[Rhino@localhost (#1)] help createfileappender
createFileAppender <appender-name> <filename>
Create a file appender
[Rhino@localhost (#2)] createFileAppender FBFILE foobar.log
Done.
Once the file appender has been created, log keys can be configured to output their loggers messages to that appender. This is
done using the "addAppenderRef" command:
[Rhino@localhost (#3)] help addappenderref
addAppenderRef <log-key> <appender-name>
Attach an appender to a logger
[Rhino@localhost (#4)] addAppenderRef rhino.foo FBFILE
Done.
The additivity of each logger determines whether the output from that key is sent to each appender. Additivity can be set to
"true" or "false":
[Rhino@localhost (#5)] setAdditivity rhino.foo false
Done.
Each logger key can have any of the levels in Table 10.1 above.
Set the logger key to
DEBUG
to enable debugging logging requests.
[Rhino@localhost (#6)] setLogLevel rhino.foo DEBUG
Done.
Log File Rollover
The Rhino SLEE file appenders support automated rollover of log files. The default behaviour is to automatically rollover
log files when they reach 1GB in size, or when requested by an administrator. An administrator can request rollover of log
files using the
rolloverAllLogFiles
method of the Log Configuration MBean. This method can also be accessed using the
Command Console.
>cd $RHINO_HOME
>./client/bin/rhino-console rolloverAllLogFiles
The default maximum file size before a log file is rolled over and the maximum number of backup files to keep can be overridden
when creating a file appender using the Log Configuration MBeans
createFileAppender
method.
10.3.2 Web Console Logging
The MBean used for configuring the Logging system from the Web Console is in the "Container Configuration" category. The
same exercise is repeated as for the Command Console above. First, create a file appender by filling in the details and clicking
on the "createFileAppender" button as in Figure 10.1.
Open Cloud Rhino 1.4.3 Administration Manual v1.1 72
Comentarios a estos manuales