### 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.14. < a4j:log >

### 6.14.1. Description

The <a4j:log > component generates JavaScript for opening of the window with client-side debug information on an Ajax request.

Table 6.28. a4j : log attributes

Attribute Name | Description
--- | ---
binding | The attribute takes a value-binding expression for a component property of a backing bean
dir | 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 | Every component may have a unique id that is automatically created if omitted
lang | 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 | The clientside script method to be called when the element is clicked
ondblclick | The client side script method to be called when the element is double-clicked
onkeydown | The client side script method to be called when a key is pressed down over the element
onkeypress | The client side script method to be called when a key is pressed over the element and released
onkeyup | The client side script method to be called when a key is released
onmousedown | The client side script method to be called when a mouse button is pressed down over the element
onmousemove | The client side script method to be called when a pointer is moved within the element
onmouseout | The client side script method to be called when a pointer is moved away from the element
onmouseover | The client side script method to be called when a pointer is moved onto the element
onmouseup | 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 | If "false", this component is not rendered
style | CSS style(s) is/are to be applied when this component is rendered
styleClass | Corresponds to the HTML class attribute
title | Advisory title information about markup elements generated for this component
width | Width of pop-up. Default value is "800".

Table 6.29. 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.14.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.14.3. Creating the Component Dynamically Using Java

Example:

    import org.ajax4jsf.component.html.AjaxLog;

    ...

    AjaxLog myLog = new AjaxLog();

    ...

### 6.14.4. Key attributes and ways of usage

Usage of the appropriate component attributes could change a representation level of debug information as well as the hot key for a window opening.

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 with several possible values ("FATAL", "ERROR", "WARN", "INFO", "ALL") could change a logging level.

The log could be generated not only in a new window, but also on the current page in a separate <div> , this is also controlled with the "popup" attribute on the component.

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. Don't renew <a4j:log> by using reRender!

### 6.14.5. Relevant resources links

On the component LiveDemo page you can see the example of <a4j:log> usage and sources for the given example.

- Prev6.13. < a4j:mediaOutput >
- Top of page
- Front page
- Next6.15. < a4j:region >