I found there is such a configuration in application.conf:
# If enabled, log SQL statements being executed.
db.default.logStatements=true
I’ve enabled it, but I can’t find any log file which logged executed sqls.
Where can I find it, or do I miss something?
1. application.conf
make sure:
This config is actually a setting of bonecp which is connection pool used in play2
2. custom logger
Add a custom logger configuration to
conf/logger.xml.The content may be:
The
com.jlbox.bonecpis forbonecp, andplayandapplicationare for play2.3. disable logger settings in application.conf
Comment the logger settings in
application.conf:Restart play, and you will see all executed SQLs(including parameter values).