Skip to content

Instantly share code, notes, and snippets.

@hisamekms
Created June 17, 2014 05:47
Show Gist options
  • Save hisamekms/590cc6104c620ea3cac3 to your computer and use it in GitHub Desktop.
Save hisamekms/590cc6104c620ea3cac3 to your computer and use it in GitHub Desktop.
EclipseLinkのログをSlf4Jにブリッジする ref: http://qiita.com/hisamekms/items/2ef7c224534591810ed6
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());
}
}
<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