Context/Logging
Sorm4j uses logging facade Log4j2 API or SLF4J API. If you want to use logging functions, you install a logger implementation. code:pom.xml
<dependency><groupId>org.apache.logging.log4j</groupId><artifactId>log4j-core</artifactId><version>2.17.1</version></dependency>
or
<dependency><groupId>org.apache.logging.log4j</groupId><artifactId>log4j-slf4j-impl</artifactId><version>2.17.1</version></dependency>
Logging could be controlled by org.nkjmlab.sorm4j.Sorm.Builder.
If you want to log about executeQuery, call on method:
code:Example.java
Sorm.Builder#setLoggerOn(Category.EXECUTE_QUERY);
Log category
MAPPING: Logs object-table mapping and object-columns mapping.
EXECUTE_QUERY: Logs executeQuery (e.g. read, readList, selectAll and so on.)
MULTI_ROW: Logs multi-row insert/merge SQL
EXECUTE_UPDATE: Logs executeUpdate excepts multirow insert/merge SQL (e.g. insert, update, delete and so on.)