Created
June 17, 2014 05:47
-
-
Save hisamekms/590cc6104c620ea3cac3 to your computer and use it in GitHub Desktop.
EclipseLinkのログをSlf4Jにブリッジする ref: http://qiita.com/hisamekms/items/2ef7c224534591810ed6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package misc.jpa; | |
import org.eclipse.persistence.config.SessionCustomizer; | |
import org.eclipse.persistence.sessions.Session; | |
public class JpaSessionCustomizer implements SessionCustomizer { | |
@Override | |
public void customize(Session sn) throws Exception { | |
sn.setSessionLog(new Slf4jSessionLogger()); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<properties> | |
<property name="eclipselink.session.customizer" value="misc.jpa.JpaSessionCustomizer"/> | |
</properties> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment