9.2. <a4j:log>

The <a4j:log> component generates JavaScript that opens a debug window, logging application information such as requests, responses, and DOM changes.

9.2.1. Basic usage

The <a4j:log> component doesn't require any additional attributes for basic functionality.

9.2.2. Log monitoring

The mode attribute determines how the log appears on the page.
  • Set mode="inline" to place the logging data in-line on the current page. This is the default setting.
  • Set mode="popup" to present the logging data in a new pop-up window. The window is set to be opened by pressing the key combination Ctrl+Shift+L; this can be partially reconfigured with the hotkey attribute, which specifies the letter key to use in combination with Ctrl+Shift instead of L.
The amount of data logged can be determined with the level attribute:
  • Set level="ERROR" to log all errors.
  • Set level="FATAL" to log only fatal messages.
  • Set level="INFO" to log only informational messages.
  • Set level="WARN" to log only warning messages.
  • Set level="ALL" to log all data. This is the default setting.

Example 9.6. <a4j:log> example

<a4j:log level="ALL" mode="inline" />

Note

The log is automatically renewed after each Ajax request. It does not need to be explicitly re-rendered. To clear previous requests, implement a Clear button or similar functionality.

9.2.3. Reference data

  • component-type: org.richfaces.AjaxLog
  • component-class: org.richfaces.component.UIAjaxLog
  • component-family: org.richfaces.AjaxLog
  • renderer-type: org.richfaces.AjaxLogRenderer

9.2.4. Style classes and skin parameters

The <a4j:log> component is intended primarily for debugging during development. However it is still possible to style the component if desired.

Table 9.1. Style classes (selectors) and corresponding skin parameters

Class (selector) Skin Parameters Mapped CSS properties
.rf-log
This class defines styles for the log.
generalTextColor
color
.rf-log-popup
This class defines styles for the log when it appears as a pop-up.
No skin parameters.
.rf-log-popup-cnt
This class defines styles for the content of the log pop-up.
No skin parameters.
.rf-log-inline
This class defines styles for the log when it appears in-line.
No skin parameters.
.rf-log-contents
This class defines styles for the log contents.
No skin parameters.
.rf-log-entry-lbl
This class defines styles for a label in the log.
No skin parameters.
.rf-log-entry-lbl-debug
This class defines styles for the debug label in the log.
No skin parameters.
.rf-log-entry-lbl-info
This class defines styles for the information label in the log.
No skin parameters.
.rf-log-entry-lbl-warn
This class defines styles for the warning label in the log.
No skin parameters.
.rf-log-entry-lbl-error
This class defines styles for the error label in the log.
No skin parameters.
.rf-log-entry-msg
This class defines styles for a message in the log.
No skin parameters.
.rf-log-entry-msg-debug
This class defines styles for the debug message in the log.
No skin parameters.
.rf-log-entry-msg-info
This class defines styles for the information message in the log.
No skin parameters.
.rf-log-entry-msg-warn
This class defines styles for the warning message in the log.
No skin parameters.
.rf-log-entry-msg-error
This class defines styles for the error message in the log.
No skin parameters.
.rf-log-entry-msg-xml
This class defines styles for an XML message in the log.
No skin parameters.