Skip Headers

# Logging

Previous

Next

You can configure a session to write run-time information to a TopLink log. This information includes status, diagnostic, SQL, and, when profiling is enabled, performance data (see "Measuring TopLink Performance With the TopLink Profiler" or "Measuring TopLink Performance With the Oracle Dynamic Monitoring System (DMS)").

Logging options are configurable at the session level (see "Configuring Logging").

Note:

To facilitate the debugging, you can add logging to your listeners to only log the events that are of the interest to your application. Within the session context, use the following logging utility:

    Session.getSessionLog().log(int level, String message)

Without the session context, use the following logging utility:

    AbstractSessionLog.getLog().log(int level, String message)

Both the `getSessionLog` and `getLog` methods return a session log (an instance of a `SessionLog` interface) loaded with an accessor's log messages and SQL. Then the session log performs logging at the level that you specify.

For more information on session event listeners, see "Session Event Listeners".

This section describes session log options, including the following:

- Log Types

- Log Output

- Log Level

- Logging SQL

- Logging Chained Exceptions

- Viewing TopLink Log Messages From the Application Server Control Console