Junos Space SDK > Developer Guides > Junos Space Application Developer Guide > Programming with the Junos Space SDK > Using the Junos Space SDK Plug-in

Using the Chainsaw Logger

The Eclipse SDK Plug-in includes a Log interface (or Logger view) which runs the "Chainsaw Logger" and displays the Space platform logs.

The Logger view is launched by clicking the View Junos Space Logs button on the tool bar.

Note: The chainsaw logger does not work with Mac OS X Lion because it requires Rosetta, which is not supported by Mac OS X Lion.

Alternatively, you can go to the Junos Space option and select View Logs on the File menu.

The Space log will appear in a tabbed pane labeled with the IP address of the Space server ( in the screen capture).

The right-hand panel shows configuration information for the connection to the Space server. The Logger is pre-configured to start up using this information.

You can filter logs by severity level by right-clicking on the receiver, as shown in the screen capture, and selecting a severity from the context menu. The default severity level is debug, meaning all severities except the Trace severity will be displayed. You can also pause and resume receiving log data, and restart the receiver from this menu.

The IP address of the Junos Space platform used by the Logger view is set in the file \eclipse\plugins\JunosSpaceSdkPlugin_<Version>\chainsaw.xml by the Junos Space SDK Installer automatically. If you change the JSVA Host IP address then you must edit the IP address in this file. Alternatively, you can edit the IP address from the Logger UI by updating the Log Receiver configuration, shown in bottom right of the Log viewer.

Manually Setting and Viewing Debug Logger Levels

Two scripts are available for getting and setting debug logging levels. These scripts are located in the /home/admin/utils directory of the JSVA. The scripts will only work if the JBoss server is up and the platform has been deployed. Otherwise, the scripts will time out.

Showing Debug Levels

The getDebugCategories.pl script is used to return the current debug log settings for all or selected categories. Its syntax is: getDebugCategories.pl <space-user-name> <space-user-password> [category]

If no category is specified, all categories are returned. The following command line gets the debug levels for all categories:
# /home/admin/utils/getDebugCategories.pl super juniper123

Sample output:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
<categories size="19"> 
  <category href="/api/space/debuglog-management/categories/jacorb" key="/categories/jacorb"> 
  <category href="/api/space/debuglog-management/categories/javax.enterprise.resource.webcontainer.jsf" key="/categories/javax.enterprise.resource.webcontainer.jsf"> 

It may be useful to show the debug levels for individual categories. For example, to show all the SQL commands in the Chainsaw logger, use the following command line:

# /home/admin/utils/getDebugCategories.pl super juniper123 org.hibernate

Sample output:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 

Setting the Debug Log Level for a Category

To set the debug log level for a category, use the setDebugCategory.pl script. Its syntax is:

setDebugCategory.pl <space-user-name> <space-user-password> <category> [OFF | FATAL | ERROR | WARN | INFO | DEBUG | TRACE | ALL]

The following command line sets the debug log level for org.hibernate to INFO:

# /home/admin/setDebugCategory.pl super juniper123 org.hibernate INFO

Note: If the category is not already in the list, it will add it automatically.

To learn more about viewing messages using the logger, refer to the following topics: