Sun logo      Previous      Contents      Next     

Sun Java™ System Application Server Platform Edition 8 Administration Guide

Chapter 14
Logging

This chapter briefly describes how to use the Admin Console to configure logging and view the server log. It contains the following sections:


About Logging

Log Records

The Sun Java™ System Application Server Platform Edition 8 uses the Java 2 platform Logging API specified in JSR 047. Logging messages are recorded in the server log, normally found at install_dir/domains/domain1/logs/server.log.

The components of the Application Server generate logging output. You may also specify loggers for your own application components.

Log records follow a uniform format:

[#|yyyy-mm-ddThh:mm:ss.SSS-Z|Log Level|ProductName_Version|LoggerName|Key Value Pairs|MessageId: Message|#]

For example:

[#|2004-01-29T11:43:43.516-0500|INFO|sun-appserver-pe8.0|javax.enterprise. system.core|_ThreadID=14;|CORE5004: Resource Deployed: [ccp:jms/DurableTopicConnectionFactory].|#]

In this example,

The log record format may be changed or enhanced in future releases.

The Logger Namespace Hierarchy

The Sun Java™ System Application Server Platform Edition 8 provides a logger for each of its modules. Table 14-1 lists the names of the modules and the namespace for each logger in the order in which they appear on the Log Levels page (see Configuring Log Levels). The last four modules in the table do not appear on the Log Levels page.

Table 14-1  Application Server Logger Namespaces

Module Name

Namespace

Root

javax.enterprise

Server

javax.enterprise.system

EJB Container: Enterprise JavaBeans components

javax.enterprise.system.container.ejb

MDB Container: Message-driven beans

javax.enterprise.system.container.ejb.mdb

Web Container

javax.enterprise.system.container.web

Classloader

javax.enterprise.system.core.classloading

Configuration

javax.enterprise.system.core.config

Naming: Java Naming and Directory Interface

javax.enterprise.system.core.naming

Security

javax.enterprise.system.core.security

JTS: Java Transaction Service (transaction manager)

javax.enterprise.system.core.transaction

JTA: Java Transaction API

javax.enterprise.resource.jta

Admin: Server administration commands and tools

javax.enterprise.system.tools.admin

Deployment: Deployment of resources and applications

javax.enterprise.system.tools.deployment

Verifier

javax.enterprise.system.tools.verifier

JAXR: Java API for XML Registries

javax.enterprise.resource.webservices.registry

JAX-RPC: Java API for XML-Based RPC

javax.enterprise.resource.webservices.rpc

SAAJ: SOAP with Attachments API for Java

javax.enterprise.resource.webservices.saaj

CORBA

javax.enterprise.resource.corba

JavaMail

javax.enterprise.resource.javamail

JMS: Java Message Service

javax.enterprise.resource.jms

Connector: J2EE Connector Architecture

javax.enterprise.resource.resourceadapter

JDO: Java Data Objects

javax.enterprise.resource.jdo

CMP: Entity beans that use container-managed persistence

javax.enterprise.system.container.cmp

Core

javax.enterprise.system.core

Util

javax.enterprise.system.util

System Output (System.out.println)

javax.enterprise.system.stream.out

System Error (System.err.println)

javax.enterprise.system.stream.err


Admin Console Tasks for Logging

Configuring General Logging Settings

  1. In the tree component, select the Application Server node.
  2. Click the Logging tab.

On the Logging Settings page, you can customize logging using the following fields:

Click Save to save your changes.

When you make changes to this page, you must stop and restart the server in order for the changes to take effect.

Configuring Log Levels

  1. In the tree component, select the Application Server node.
  2. Click the Logging tab.
  3. On the Logging Settings page, click Log Levels.
  4. On the Module Log Levels page, choose a new value from the combo box opposite the module or modules whose log level you wish to change. The default level is INFO, meaning that messages at that level or higher (WARNING, SEVERE) will appear in the log. You may specify any of the following values (listed from highest to lowest):
    • SEVERE
    • WARNING
    • INFO
    • CONFIG
    • FINE
    • FINER
    • FINEST
    • OFF
  5. Use the Additional Properties area to configure log levels for any application loggers you specified on the Logging Settings page. The property name is the logger namespace, and the value is one of the eight possible levels.
  6. Also use this area to change the log level for a submodule, such as the transport submodule of the CORBA module:

    javax.enterprise.resource.corba.ORBId.transport
  7. Click Save to save your changes, or click Load Defaults to restore the default values.

Calls to System.out.println will be logged at the INFO level using the logger name javax.enterprise.system.stream.out. Calls to System.err.println will be logged at the WARNING level using the logger name javax.enterprise.system.stream.err. To turn off the logs from these sources, specify the logger name with the value OFF in the Additional Properties area.

Changes to the Log Level settings take effect immediately. They are also saved in the domain.xml file to be used when the server restarts.

Viewing the Server Log

  1. In the tree component, select the Application Server node.
  2. Click the Logging tab.
  3. On the Logging Settings page, click Open Log Viewer. The Log Viewer opens in a new window.

The most recent 40 entries in the server log appear, with the settings you specified on the Logging Settings and Log Levels pages.

Click the triangle next to the Timestamp header to sort the messages so that the most recent one appears last.

To view a formatted version of any message, click the link marked

(details)

A window labeled Log Entry Detail appears, with a formatted version of the message.

Note

Click Modify Search to go to an area that allows you to customize and filter the log viewer. Use the fields as follows:



Previous      Contents      Next     


Copyright 2004 Sun Microsystems, Inc. All rights reserved.