LoginSignup
0
0

More than 3 years have passed since last update.

[playframework2.6]ehcacheのログ有効化/logback.xml

Last updated at Posted at 2019-11-27

Play組み込みのehcacheのDIがうまく動作してくれないので、独自にehcache2.10.4を使ってキャッシュヘルパーを実装したのですが、一部のオブジェクトでキャッシュされないという事象が発生しました。

当初、new Element(key, obj)cache.put(elem)で例外が発生しないので、キャッシュ処理でなく周辺を探していたのですが、ログ出力設定が漏れていただけで、実際にはehcache内部でエラーが発生していました。

logback.xmlに設定を追加したらしっかりと問題を報告してくれました。

logback.xml
    <logger name="net.sf.ehcache" level="ALL"/> 

参考

spring - How to enable logging of Ehcache - Stack Overflow
https://stackoverflow.com/questions/10705107/how-to-enable-logging-of-ehcache/10705998#10705998

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0