springboot打印activiti的sql日志

activiti 专栏收录该内容
1 篇文章 0 订阅
logging:
  level:
    com.len.mapper: DEBUG
    org.activiti.engine.impl.persistence.entity: trace

在这里插入图片描述

2018-12-18 14:46:31.497 DEBUG 24380 --- [nio-8080-exec-1] lectDeploymentCountByQueryCriteria_mysql : ==>  Preparing: select distinct count(RES.ID_) from ACT_RE_DEPLOYMENT RES 
2018-12-18 14:46:31.497 DEBUG 24380 --- [nio-8080-exec-1] lectDeploymentCountByQueryCriteria_mysql : ==> Parameters: 
2018-12-18 14:46:31.499 TRACE 24380 --- [nio-8080-exec-1] lectDeploymentCountByQueryCriteria_mysql : <==    Columns: count(RES.ID_)
2018-12-18 14:46:31.500 TRACE 24380 --- [nio-8080-exec-1] lectDeploymentCountByQueryCriteria_mysql : <==        Row: 2
2018-12-18 14:46:31.500 DEBUG 24380 --- [nio-8080-exec-1] lectDeploymentCountByQueryCriteria_mysql : <==      Total: 1
2018-12-18 14:47:08.098 DEBUG 24380 --- [nio-8080-exec-4] com.len.mapper.SysUserMapper.login       : ==>  Preparing: select id, username, password, age, email, photo, real_name, create_by, update_by, create_date, update_date, del_flag from sys_user where username=? 
2018-12-18 14:47:08.099 DEBUG 24380 --- [nio-8080-exec-4] com.len.mapper.SysUserMapper.login       : ==> Parameters: tom(String)
2018-12-18 14:47:08.100 DEBUG 24380 --- [nio-8080-exec-4] com.len.mapper.SysUserMapper.login       : <==      Total: 1
2018-12-18 14:47:08.101 DEBUG 24380 --- [nio-8080-exec-4] c.len.mapper.SysMenuMapper.getUserMenu   : ==>  Preparing: select m.*,r.id as rid,r.role_name as role_name,r.remark as remark from sys_menu m left join sys_role_menu rm on m.id=rm.menu_id left join sys_role r on rm.role_id=r.id left join sys_role_user ru on r.id=ru.role_id where ru.user_id =? order by m.order_num asc 
2018-12-18 14:47:08.101 DEBUG 24380 --- [nio-8080-exec-4] c.len.mapper.SysMenuMapper.getUserMenu   : ==> Parameters: 2211fec3e17c11e795ed201a068c6482(String)
2018-12-18 14:47:08.117 DEBUG 24380 --- [nio-8080-exec-4] c.len.mapper.SysMenuMapper.getUserMenu   : <==      Total: 9
2018-12-18 14:47:08,118:INFO ========http-nio-8080-exec-4 (LoginController.java:108) - 用户:tom,登陆成功,ip:0:0:0:0:0:0:0:1
2018-12-18 14:47:13.515 DEBUG 24380 --- [io-8080-exec-10] o.a.e.i.p.e.G.selectGroupsByUserId       : ==>  Preparing: select g.* from ACT_ID_GROUP g, ACT_ID_MEMBERSHIP membership where g.ID_ = membership.GROUP_ID_ and membership.USER_ID_ = ? 
2018-12-18 14:47:13.517 DEBUG 24380 --- [io-8080-exec-10] o.a.e.i.p.e.G.selectGroupsByUserId       : ==> Parameters: 2211fec3e17c11e795ed201a068c6482(String)
2018-12-18 14:47:13.521 TRACE 24380 --- [io-8080-exec-10] o.a.e.i.p.e.G.selectGroupsByUserId       : <==    Columns: ID_, REV_, NAME_, TYPE_
2018-12-18 14:47:13.521 TRACE 24380 --- [io-8080-exec-10] o.a.e.i.p.e.G.selectGroupsByUserId       : <==        Row: 0ea934e5e55411e7b983201a068c6482, 1, manage, null
2018-12-18 14:47:13.522 DEBUG 24380 --- [io-8080-exec-10] o.a.e.i.p.e.G.selectGroupsByUserId       : <==      Total: 1
2018-12-18 14:47:13.525 DEBUG 24380 --- [io-8080-exec-10] o.a.e.i.p.e.T.selectTaskByQueryCriteria  : ==>  Preparing: select distinct RES.* from ACT_RU_TASK RES inner join ACT_RU_IDENTITYLINK I on I.TASK_ID_ = RES.ID_ WHERE RES.ASSIGNEE_ is null and I.TYPE_ = 'candidate' and ( I.USER_ID_ = ? or I.GROUP_ID_ IN ( ? ) ) order by RES.ID_ asc LIMIT ? OFFSET ? 
2018-12-18 14:47:13.526 DEBUG 24380 --- [io-8080-exec-10] o.a.e.i.p.e.T.selectTaskByQueryCriteria  : ==> Parameters: 2211fec3e17c11e795ed201a068c6482(String), 0ea934e5e55411e7b983201a068c6482(String), 2147483647(Integer), 0(Integer)
2018-12-18 14:47:13.528 TRACE 24380 --- [io-8080-exec-10] o.a.e.i.p.e.T.selectTaskByQueryCriteria  : <==    Columns: ID_, REV_, EXECUTION_ID_, PROC_INST_ID_, PROC_DEF_ID_, NAME_, PARENT_TASK_ID_, DESCRIPTION_, TASK_DEF_KEY_, OWNER_, ASSIGNEE_, DELEGATION_, PRIORITY_, CREATE_TIME_, DUE_DATE_, CATEGORY_, SUSPENSION_STATE_, TENANT_ID_, FORM_KEY_
2018-12-18 14:47:13.528 TRACE 24380 --- [io-8080-exec-10] o.a.e.i.p.e.T.selectTaskByQueryCriteria  : <==        Row: 35013, 1, 35005, 35005, process_leave:2:35004, 经理审批, null, null, manager, null, null, null, 50, 2018-12-18 14:43:39.0, null, null, 1, , null
2018-12-18 14:47:13.528 DEBUG 24380 --- [io-8080-exec-10] o.a.e.i.p.e.T.selectTaskByQueryCriteria  : <==      Total: 1
2018-12-18 14:47:13.530 DEBUG 24380 --- [io-8080-exec-10] o.a.e.i.p.entity.TaskEntity.selectTask   : ==>  Preparing: select * from ACT_RU_TASK where ID_ = ? 
2018-12-18 14:47:13.530 DEBUG 24380 --- [io-8080-exec-10] o.a.e.i.p.entity.TaskEntity.selectTask   : ==> Parameters: 35013(String)
2018-12-18 14:47:13.555 TRACE 24380 --- [io-8080-exec-10] o.a.e.i.p.entity.TaskEntity.selectTask   : <==    Columns: ID_, REV_, EXECUTION_ID_, PROC_INST_ID_, PROC_DEF_ID_, NAME_, PARENT_TASK_ID_, DESCRIPTION_, TASK_DEF_KEY_, OWNER_, ASSIGNEE_, DELEGATION_, PRIORITY_, CREATE_TIME_, DUE_DATE_, CATEGORY_, SUSPENSION_STATE_, TENANT_ID_, FORM_KEY_
2018-12-18 14:47:13.555 TRACE 24380 --- [io-8080-exec-10] o.a.e.i.p.entity.TaskEntity.selectTask   : <==        Row: 35013, 1, 35005, 35005, process_leave:2:35004, 经理审批, null, null, manager, null, null, null, 50, 2018-12-18 14:43:39.0, null, null, 1, , null
2018-12-18 14:47:13.555 DEBUG 24380 --- [io-8080-exec-10] o.a.e.i.p.entity.TaskEntity.selectTask   : <==      Total: 1
2018-12-18 14:47:13.555 DEBUG 24380 --- [io-8080-exec-10] o.a.e.i.p.e.V.selectVariablesByTaskId    : ==>  Preparing: select * from ACT_RU_VARIABLE where TASK_ID_ = ? 
2018-12-18 14:47:13.556 DEBUG 24380 --- [io-8080-exec-10] o.a.e.i.p.e.V.selectVariablesByTaskId    : ==> Parameters: 35013(String)
2018-12-18 14:47:13.557 DEBUG 24380 --- [io-8080-exec-10] o.a.e.i.p.e.V.selectVariablesByTaskId    : <==      Total: 0

logback.xml配置文件中配置activiti的sql日志打印:
在logback.xml配置文件中增加如下配置:

<!-- Activiti日志 -->
	<logger name="org.activiti" level="ERROR" />
	<logger name="org.activiti.engine.impl.persistence.entity" level="DEBUG" />

  • 3
    点赞
  • 2
    评论
  • 5
    收藏
  • 一键三连
    一键三连
  • 扫一扫,分享海报

©️2021 CSDN 皮肤主题: 编程工作室 设计师:CSDN官方博客 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值