Sun GlassFish Enterprise Server v2.1.1 Developer's Guide

Setting the Logging Level

One of the default persistence provider's database properties that you can set in the persistence.xml file is toplink.logging.level. For example, setting the logging level to FINE or higher logs all SQL statements. For details about this property, see Extensions for Logging inTopLink JPA Extensions Reference.

You can also set the TopLink Essentials logging level globally in the Application Server in any of the following ways:

Setting the logging level to OFF disables TopLink Essentials logging. A logging level set in the persistence.xml file takes precedence over the global logging level.

You can set the logging level for Java Persistence in general using the Admin Console. In the developer profile, select the Application Server component and the Logging tab. In the cluster profile, select the Logger Settings component under the relevant configuration. Select the Log Levels tab. Then set the logging level for Persistence. Setting the logging level to OFF disables Java Persistence logging.