2.  OpenJPA Logging

By default, OpenJPA uses a basic logging framework with the following output format:

millis  diagnostic context  level  [thread name]  channel - message

For example, when loading an application that uses OpenJPA, a message like the following will be sent to the openjpa.Runtime channel:

2107  INFO   [main] openjpa.Runtime - Starting OpenJPA 0.9.7

The default logging system accepts the following parameters:

Example 3.1.  Standard OpenJPA Log Configuration

<property name="openjpa.Log" value="DefaultLevel=WARN, Runtime=INFO, Tool=INFO"/>

Example 3.2.  Standard OpenJPA Log Configuration + All SQL Statements

<property name="openjpa.Log" value="DefaultLevel=WARN, Runtime=INFO, Tool=INFO, SQL=TRACE"/>

Example 3.3.  Logging to a File

<property name="openjpa.Log" value="File=/tmp/org.apache.openjpa.log, DefaultLevel=WARN, Runtime=INFO, Tool=INFO"/>