Ebean uses SLF4J for logging.

SQL and Transaction logging

During development it is expected that you include logging of io.ebean.SQL and io.ebean.TXN. These log the sql statements executed, bind values for statement execution and transaction demarcation.

<!-- LOGBACK configuration -->

<!-- SQL and bind values -->
<logger name="io.ebean.SQL" level="TRACE"/>

<!-- Transaction Commit and Rollback events -->
<logger name="io.ebean.TXN" level="TRACE"/>

Summary logging

The summary logging of io.ebean.SUM is useful for showing lazy loading queries and how they relate back to origin queries. This is useful when looking at more complex object graphs are built. In tuning queries for N+1 etc.

<!-- LOGBACK configuration -->

<!-- Summary level details -->
<logger name="io.ebean.SUM" level="TRACE"/>

L2 Cache logging

The L2 cache events can be logged using the logger entries below. This is useful when you are starting out using the L2 cache and looking at the behaviour with L2 caching.

<!-- LOGBACK configuration -->

 <!-- L2 logging -->
<logger name="io.ebean.cache.QUERY" level="TRACE"/>
<logger name="io.ebean.cache.BEAN" level="TRACE"/>
<logger name="io.ebean.cache.COLL" level="TRACE"/>
<logger name="io.ebean.cache.NATKEY" level="TRACE"/>