Logging

This table lists the properties of the Logging page of the persistence.xml Editor.


Note:

This page is not available for projects using the Generic platform.


Property Description Default

Logging Level

Specifies the amount and detail of log output by selecting the log level (in ascending order of information):

The following are the valid values for the java.util.logging.Level:

  • OFF–disables logging

  • SEVERE–logs exceptions indicating TopLink cannot continue, as well as any exceptions generated during login. This includes a stack trace.

  • WARNING–logs exceptions that do not force TopLink to stop, including all exceptions not logged with severe level. This does not include a stack trace.

  • INFO–logs the login/logout per sever session, including the user name. After acquiring the session, detailed information is logged.

  • CONFIG–logs only login, JDBC connection, and database information.

  • FINE–logs SQL.

  • FINER–similar to warning. Includes stack trace.

  • FINEST–includes additional low level information.

Example: persistence.xml file

<property name="eclipselink.logging.level" value="INFO"/>

Info

Timestamp

Control whether the timestamp is logged in each log entry.

The following are the valid values:

  • True–log a timestamp.

  • False–do not log a timestamp.

Example: persistence.xml file

<property name="eclipselink.logging.timestamp" value="false"/>

True

Thread

Control whether a thread identifier is logged in each log entry.

The following are the valid values:

  • true–log a thread identifier.

  • false–do not log a thread identifier.

True

Session

Control whether an EclipseLink session identifier is logged in each log entry.

The following are the valid values:

  • true–log a EclipseLink session identifier.

  • false–do not log a EclipseLink session identifier.

Example: persistence.xml file

<property name="eclipselink.logging.session" value="false"/>

true

Exceptions

Control whether the exceptions thrown from within the EclipseLink code are logged prior to returning the exception to the calling application. Ensures that all exceptions are logged and not masked by the application code.

The following are the valid values:

  • true–log all exceptions.

  • false–do not log exceptions.

Example: persistence.xml file

<property name="eclipselink.logging.exceptions" value="true"/>

false

Log file

Specify a file location for the log output (instead of the standard out).

Example: persistence.xml file

<property name="eclipselink.logging.file" value="C:\myout\" />

stdout

Logger

Select the type of logger to use:

The following are the valid values:

  • DefaultLogger–the EclipseLink native logger eclipselink.logging.DefaultSessionLog.

  • JavaLogger–the java.util.logging logger eclipselink.logging.JavaLog.

  • ServerLogger–the java.util.logging logger eclipselink.platform.server.ServerLog. Integrates with the application server's logging as define in the eclipselink.platform.server.ServerPlatform.

  • Fully qualified class name of a custom logger. The custom logger must implement the eclipselink.logging.SessionLog interface.

Example: persistence.xml file

<property name="eclipselink.logging.logger" value="acme.loggers.MyCustomLogger" />

DefaultLogger

Logging Categories

You can also specify the logging level for the following specific categories:

  • SQL

  • Connection

  • Event

  • Query

  • Cache

  • Propagation

  • EJB

  • DMS

  • EJB or metatdata

  • JPA metadata

  • Weaving

  • Properties

  • Server

Info


Related references