Leo
Leo

Reputation: 21

Why ebean.properties doesn't work in play 2.4?

I used ebean in my project, and I want to show sql with ebean, however,

ebean.ddl.generate=true

ebean.ddl.run=true

ebean.debug.sql=true

ebean.debug.lazyload=false

ebean.loggingToJavaLogger=true

ebean.logging=all

ebean.logging.logfilesharing=all

ebean.logging.directory=/logs

ebean.logging.iud=sql

ebean.logging.query=sql

ebean.logging.sqlquery=sql

ebean.logging.txnCommit=none

the config doesn't work at all.

And I also configured db.***.logSql = true in application.conf and <logger name="logger.org.jdbcdslog.StatementLogger" level="INFO"/> in logback.xml (jdbcdslog.jar has been downloaded)

Upvotes: 1

Views: 998

Answers (2)

Rob Bygrave
Rob Bygrave

Reputation: 4021

None of those ebean.logging properties are valid.

Refer to http://ebean-orm.github.io/docs/logging ... for information on all the logging configuration but you probably should including transaction logging and summary logging as well.

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

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

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

Upvotes: 1

Leo
Leo

Reputation: 21

Due to play2.4 has deprecated the log config in application.conf, we need to config in the logback.xml with <logger name="org.avaje.ebean.SQL" level="TRACE"/>, thats enough.

Upvotes: 1

Related Questions