当前位置: 首页 > 工具软件 > Persistence4J > 使用案例 >

java 日志打印sql语句_log4j如何打印activiti里面的sql语句

单凯捷
2023-12-01

自己项目用的是mybatis, log4j可以打印日志,看了activiti源码,同样使用的是mybatis,但是自己项目里的sql语句可以打印,activiti里的就打印不出来

我的log4j配置如下:

log4j.rootLogger=INFO,R,A2

log4j.addivity.org.apache=true

log4j.appender.R=org.apache.log4j.DailyRollingFileAppender

log4j.appender.R.Threshold=INFO,DEBUG,ERROR,WARN

log4j.appender.R.File=D:/log

log4j.appender.R.layout=org.apache.log4j.PatternLayout

log4j.appender.R.Encoding=utf-8

log4j.appender.R.DatePattern='.'yyyy-MM-dd'.txt'

log4j.appender.R.layout.ConversionPattern=%d-[HL] %p %t %c - %m%n

log4j.appender.A2=org.apache.log4j.ConsoleAppender

log4j.appender.A2.layout=org.apache.log4j.PatternLayout

log4j.appender.A2.layout.ConversionPattern=%-d{yyyy-mm-dd HH:mm:ss, SSS} [%c] [%p] %m%n

log4j.logger.com.ibatis = ALL

log4j.logger.com.mybatis = ALL

log4j.logger.com.ibatis.common.jdbc.SimpleDataSource = ALL

log4j.logger.com.ibatis.common.jdbc.ScriptRunner = ALL

log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate = ALL

log4j.logger.java.sql.Connection = ALL

log4j.logger.java.sql.Statement = ALL

log4j.logger.java.sql.PreparedStatement = ALL, fileout

log4j.logger.java.sql.ResultSet = ALL

#log4j.logger.org.activiti.engine.impl.persistence.entity.AttachmentEntity=DEBUG, Console, File

#log4j.logger.org.activiti.engine.impl.persistence.entity.ByteArrayEntity=DEBUG, Console, File

#log4j.logger.org.activiti.engine.impl.persistence.entity.CommentEntity=DEBUG, Console, File

#log4j.logger.org.activiti.engine.impl.persistence.entity.DeploymentEntity=DEBUG, Console, File

#log4j.logger.org.activiti.engine.impl.persistence.entity.EvenLogEntryEntity=DEBUG, Console, File

#log4j.logger.org.activiti.engine.impl.persistence.entity.EventSubscriptionEntity=DEBUG, Console, File

#log4j.logger.org.activiti.engine.impl.persistence.entity.ExecutionEntity=DEBUG, Console, File

#log4j.logger.org.activiti.engine.impl.persistence.entity.GroupEntity=DEBUG, Console, File

#log4j.logger.org.activiti.engine.impl.persistence.entity.HistoricActivityInstanceEntity=DEBUG, Console, File

#log4j.logger.org.activiti.engine.impl.persistence.entity.HistoricDetailEntity=DEBUG, Console, File

#log4j.logger.org.activiti.engine.impl.persistence.entity.HistoricIdentityLinkEntity=DEBUG, Console, File

#log4j.logger.org.activiti.engine.impl.persistence.entity.HistoricProcessInstanceEntity=DEBUG, Console, File

#log4j.logger.org.activiti.engine.impl.persistence.entity.HistoricTaskInstanceEntity=DEBUG, Console, File

#log4j.logger.org.activiti.engine.impl.persistence.entity.HistoricVariableInstanceEntity=DEBUG, Console, File

#log4j.logger.org.activiti.engine.impl.persistence.entity.IdentityInfoEntity=DEBUG, Console, File

#log4j.logger.org.activiti.engine.impl.persistence.entity.IdentityLinkEntity=DEBUG, Console, File

#log4j.logger.org.activiti.engine.impl.persistence.entity.JobEntity=DEBUG, Console, File

#log4j.logger.org.activiti.engine.impl.persistence.entity.MembershipRelation=DEBUG, Console, File

#log4j.logger.org.activiti.engine.impl.persistence.entity.ModelEntity=DEBUG, Console, File

#log4j.logger.org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity=DEBUG, Console, File

#log4j.logger.org.activiti.engine.impl.persistence.entity.ProcessDefinitionInfoEntity=DEBUG, Console, File

#log4j.logger.org.activiti.engine.impl.persistence.entity.PropertyEntity=DEBUG, Console, File

#log4j.logger.org.activiti.engine.impl.persistence.entity.ResourceEntity=DEBUG, Console, File

#log4j.logger.org.activiti.engine.impl.TablePageMap=DEBUG, Console, File

#log4j.logger.org.activiti.engine.impl.persistence.entity.UserEntity=DEBUG, Console, File

#log4j.logger.org.activiti.engine.impl.persistence.entity.VariableInstanceEntity=DEBUG, Console, File

log4j.logger.org.activiti.engine.impl.persistence.entity = DEBUG

 类似资料: