Sun Java System Application Server Platform Edition 8.1 2005Q2 Update 2 Administration Guide

- Previous: Chapter 14 Thread Pools
- Next: Admin Console Tasks for Logging

# About Logging

- Log Records

- The Logger Namespace Hierarchy

## Log Records

The Application Server uses the Java 2 platform Logging API specified in JSR 047. Application Server logging messages are recorded in the server log, normally found at domain-dir`/logs/server.log`.

The domain-dir`/logs` directory contains two other kinds of logs in addition to the server log. In the `access` subdirectory are the HTTP Service access logs, and in the `tx` subdirectory are the Transaction Service logs. For information about these logs, see To configure the HTTP Service access log and Configuring Transactions.

The components of the Application Server generate logging output. Application components can also generate logging output.

Application components may use the Apache Commons Logging Library to log messages. The platform standard JSR 047 API, however, is recommended for better log configuration.

Log records follow a uniform format:

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

For example:

    [#|2004-10-21T13:25:53.852-0400|INFO|sun-appserver-epe8.1|javax.enterprise.
    system.core|_ThreadID=13;|CORE5004: Resource Deployed:
    [cr:jms/DurableConnectionFactory].|#]

In this example,

- `[#` and `#]` mark the beginning and end of the record.

- The vertical bar (`|`) separates the record fields.

- `2004-10-21T13:25:53.852-0400` specifies the date and time.

- The Log Level is `INFO`. This level may have any of the following values: `SEVERE`, `WARNING`, `INFO`, `CONFIG`, `FINE`, `FINER`, and `FINEST`.

- The ProductName-Version is `sun-appserver-pe8.1`.

- The LoggerName is a hierarchical logger namespace that identifies the source of the log module, in this case `javax.enterprise.system.core`.

- The Key Value Pairs are key names and values, typically a thread ID such as `_ThreadID=14;`.

- The Message is the text of the log message. For all Application Server `SEVERE` and `WARNING` messages and many `INFO` messages, it begins with a message ID that consists of a module code and a numerical value (in this case, `CORE5004`).

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

See Also:

- The Logger Namespace Hierarchy

## The Logger Namespace Hierarchy

The Application Server provides a logger for each of its modules. The following table lists the names of the modules and the namespace for each logger in alphabetical order, as they appear on the Log Levels page of the Admin Console (see To configure log levels). The last three modules in the table do not appear on the Log Levels page.

Table 15–1 Application Server Logger Namespaces

Module Name | Namespace
--- | ---
Admin | `javax.enterprise.system.tools.admin`
Classloader | `javax.enterprise.system.core.classloading`
CMP | `javax.enterprise.system.container.cmp`
Configuration | `javax.enterprise.system.core.config`
Connector | `javax.enterprise.resource.resourceadapter`
CORBA | `javax.enterprise.resource.corba`
Deployment | `javax.enterprise.system.tools.deployment`
EJB Container | `javax.enterprise.system.container.ejb`
JavaMail | `javax.enterprise.resource.javamail`
JAXR | `javax.enterprise.resource.webservices.registry`
JAX-RPC | `javax.enterprise.resource.webservices.rpc`
JDO | `javax.enterprise.resource.jdo`
JMS | `javax.enterprise.resource.jms`
JTA | `javax.enterprise.resource.jta`
JTS | `javax.enterprise.system.core.transaction`
MDB Container | `javax.enterprise.system.container.ejb.mdb`
Naming | `javax.enterprise.system.core.naming`
Node Agent (Enterprise Edition only) | `javax.ee.enterprise.system.nodeagent`
Root | `javax.enterprise`
SAAJ | `javax.enterprise.resource.webservices.saaj`
Security | `javax.enterprise.system.core.security`
Server | `javax.enterprise.system`
Synchronization (Enterprise Edition only) | `javax.ee.enterprise.system.tools.synchronization`
Util | `javax.enterprise.system.util`
Verifier | `javax.enterprise.system.tools.verifier`
Web Container | `javax.enterprise.system.container.web`
Core | `javax.enterprise.system.core`
System Output (`System.out.println`) | `javax.enterprise.system.stream.out`
System Error (`System.err.println`) | `javax.enterprise.system.stream.err`

See Also:

- Log Records

- To configure log levels

- Previous: Chapter 14 Thread Pools
- Next: Admin Console Tasks for Logging

- © 2010, Oracle Corporation and/or its affiliates