Cmobilecom JPA 2.2.2 Developer Guide

25 Logging

SLF4j is used. You can use log4j, logback or java.util.logging as underlying logging framework. Logging messages include generated SQL statements and bound parameters for diagnosis. For enhancer, logging shows a list of enhanced classes. But for static metamodel generator, annotation processor messager is used to show generated static metamodel classes and attributes, and no configuration is needed.

For example, configure logback as underlying logging framework:

Java

dependencies {
	...
	runtimeOnly 'ch.qos.logback:logback-classic:1.2.3'
}
logback.xml (in runtime classpath)
<configuration>

	<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
		<encoder>
			<pattern>%d{HH:mm:ss.SSS} %-5level %logger{36} - %msg%n</pattern>
		</encoder>
	</appender>
	
	<root level="DEBUG">
		<appender-ref ref="CONSOLE"/>
	</root>

</configuration>

Android

dependencies {
	...
	runtimeOnly 'com.github.tony19:logback-android:1.1.1-8'
}
assets/logback.xml
<configuration>

	<appender name="logcat" class="ch.qos.logback.classic.android.LogcatAppender">
		<encoder>
			<pattern>%d{HH:mm:ss.SSS} %-5level %logger{36} - %msg%n</pattern>
		</encoder>
	</appender>
	
	<root level="DEBUG">
		<appender-ref ref="logcat"/>
	</root>

</configuration>
Set log level to DEBUG for logging messages mentioned above.
License InstallationORM Extension SchemaFrames / No Frames