Skip to content

Commit

Permalink
feat: log SQL statements to a dedicated appender (#586)
Browse files Browse the repository at this point in the history
Signed-off-by: Li Zhanhui <[email protected]>
  • Loading branch information
lizhanhui authored Nov 6, 2023
1 parent 4f1df04 commit d58e555
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion distribution/conf/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
<DefaultRolloverStrategy max="10"/>
</RollingFile>

<RollingFile name="mybatisAppender" fileName="${LOG_DIR}/mybatis.log" filePattern="${LOG_DIR}/mybatis.%i.log">
<PatternLayout pattern = "%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %m%n"/>
<SizeBasedTriggeringPolicy size="100MB" />
<DefaultRolloverStrategy max="2"/>
</RollingFile>

<RollingFile name="streamAppender" fileName="${LOG_DIR}/stream.log" filePattern="${LOG_DIR}/stream.%i.log">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %m%n"/>
<SizeBasedTriggeringPolicy size="100MB"/>
Expand All @@ -52,7 +58,7 @@
<AppenderRef ref="streamAppender"/>
</Logger>
<Logger name="com.automq.rocketmq.metadata.mapper" level="trace" additivity="false">
<AppenderRef ref="controllerAppender" />
<AppenderRef ref="mybatisAppender" />
</Logger>
<Root level="info">
<AppenderRef ref="rollingFile"/>
Expand Down

0 comments on commit d58e555

Please sign in to comment.