Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

There are several parameters that are used by OpenJPA Log. Here are some that might be of value when debugging test cases:. Note that the logger names are case sensitive while the log levels are not.

  • DefaultLevel sets the level for all loggers that are not otherwise set
  • file sets the file name for logging output
  • Enhance logs messages from the enhancer
  • Metadata logs messages from the metadata processor
  • Tool logs messages from the schema synchronization tool
  • SQL logs messages from the SQL generator
  • JDBC logs messages related to JDBC
  • Schema logs messages related to schema
  • Runtime logs messages related to runtime
  • Query logs messages related to queried
  • DataCache logs messages related to caching

Log levels are:specify the minimum log message that is output. All log messages with a level higher than the log level set for a logger are output. So if INFO is specified, log messages of level INFO, WARN, ERROR, and SEVERE are output.

  • TRACE
  • INFO
  • INFO
  • TRACE
  • WARN
  • ERROR
  • SEVERE

For example, to avoid enhancement warnings, get detailed SQL information, and write the log data to a file:

Code Block
mvn test -Dtest=TestPersistence -Dopenjpa.Log=Enhance=ERROR,SQL=TRACE,file=openjpa.log

Testing against alternate databases

...