わかりませんが、 p6spyTRACE_LEVEL_FILE
を試してみてください。
以下をdependencies.yml
- p6spy -> p6spy 2.1.2:
exclude:
- p6spy -> p6spy-signedjar-test
ランplay deps
次のように「application.conf」を編集します。
# Comment out the default test URL
#%test.db.url=jdbc:h2:mem:play;MODE=MYSQL;LOCK_MODE=0
# Use the p6spy driver
%test.db.driver=com.p6spy.engine.spy.P6SpyDriver
%test.db.url=jdbc:p6spy:h2:mem:play;MODE=MYSQL;LOCK_MODE=0
# Tell the p6spy driver to use the H2 JPA dialect
%test.jpa.dialect=org.hibernate.dialect.H2Dialect
最後にconf/spy.properties
、以下を作成して配置します。
appender=com.p6spy.engine.spy.appender.StdoutLogger
realdatasourceclass=org.h2.Driver
以上です。準備完了です。でアプリを起動するとplay test
、標準出力に記録されたすべてのデータベース クエリが表示されます。
で設定できるオプションは他にもたくさんありますspy.properties
。