H2 and query logging? H2 and query logging? database database

H2 and query logging?


The TRACE_LEVEL_FILE is the best option. There are 4 levels:

  • 0 (disabled)
  • 1 (only errors)
  • 2 (errors and info messages, including SQL statements)
  • 3 (debug level; including SQL statements and parameter values)
  • 4 (log using SLF4J)

So I guess 2 would be the right level in your case.

There is also a simple way to analyze the trace file, documented in Database Profiling.