### Create new RichFaces Documentation Jira issue

Summary
255 characters left
Description
Environment
This will launch the RichFaces Jira page - to complete your feedback please login if needed, and submit the Jira.

JBoss.org Community Documentation

- Prev
- Next

### 6.5.4. < a4j:log > available since 3.0.0

expand all

#### 6.5.4.1. Description

The <a4j:log > component generates JavaScript that opens a debug window with useful debug information.

Table 6.53. a4j : log attributes

Attribute Name | Description
--- | ---
binding | JSF: The attribute takes a value-binding expression for a component property of a backing bean
dir | HTML: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) and "RTL" (right-to-left)
height | Height of pop-up. Default value is "600".
hotkey | Keyboard key for activate ( in combination with CTRL+SHIFT ) log window. Default value is "L"
id | JSF: Every component may have a unique id that is automatically created if omitted
lang | HTML: Code describing the language used in the generated markup for this component
level | Log level. The possible values are "FATAL", "ERROR", "WARN", "INFO", "DEBUG", "ALL". Component sets level 'ALL' by default.
name | Name of pop-up window. Default value is "LogWindow"
onclick | DHTML: The client-side script method to be called when the element is clicked
ondblclick | DHTML: The client-side script method to be called when the element is double-clicked
onkeydown | DHTML: The client-side script method to be called when a key is pressed down over the element
onkeypress | DHTML: The client-side script method to be called when a key is pressed over the element and released
onkeyup | DHTML: The client-side script method to be called when a key is released
onmousedown | DHTML: The client-side script method to be called when a mouse button is pressed down over the element
onmousemove | DHTML: The client-side script method to be called when a pointer is moved within the element
onmouseout | DHTML: The client-side script method to be called when a pointer is moved away from the element
onmouseover | DHTML: The client-side script method to be called when a pointer is moved onto the element
onmouseup | DHTML: The client-side script method to be called when a mouse button is released
popup | Renders log as pop-up window or as div element on the page. Default value is "true".
rendered | JSF: If "false", this component is not rendered
style | HTML: CSS style rules to be applied to the component
styleClass | JSF: Assigns one or more CSS class names to the component. Corresponds to the HTML "class" attribute.
title | HTML: Advisory title information about markup elements generated for this component
width | HTML: Width of pop-up. Default value is "800".

Table 6.54. Component identification parameters

Name | Value
--- | ---
component-type | org.ajax4jsf.Log
component-family | org.ajax4jsf.Log
component-class | org.ajax4jsf.component.html.AjaxLog
renderer-type | org.ajax4jsf.LogRenderer

#### 6.5.4.2. Creating the Component with a Page Tag

To create the simplest variant on a page use the following syntax:

    <a4j:log popup="false" level="ALL" style="width: 800px; height: 300px;"></a4j:log>

Then, in order to open a log window, press "CTRL+SHIFT+L" on a page with the component.

#### 6.5.4.3. Creating the Component Dynamically Using Java

Example:

    import org.ajax4jsf.component.html.AjaxLog;

    ...

    AjaxLog myLog = new AjaxLog();

    ...

#### 6.5.4.4. Details of usage

The <a4j:log > component generates JavaScript that opens a log window with useful debug information, which contains data on requests and responses, DOM tree changes et al. The log could be generated not only in a new window, but also on the current page in a separate <div> element. This feature is controlled with the component "popup" attribute. The window is opened on pressing of "CTRL+SHIFT+L", which is default registered key. The hot key could be changed with the "hotkey" attribute, where it's necessary to define one letter that together with "CTRL+SHIFT" opens a window.

The "level" attribute has several possible values "FATAL", "ERROR", "WARN", "INFO", "ALL" and is used when it is necessary to change a logging level.

Example:

    <a4j:log level="ALL" popup="false" width="400" height="200"/>

The component defined this way is decoded on a page as <div> inside a page, where all the information beginning with informational message is generated.

## Note:

<a4j:log> is getting renewed automatically after execution of Ajax requests. Do not renew <a4j:log> by using reRender!

#### 6.5.4.5. Relevant resources links

Vizit the Log page at RichFaces LiveDemo for example of component usage and their sources.

- Prev6.5.3. < a4j:htmlCommandLink > ...
- Top of page
- Front page
- Next6.6. Data Iteration