How does log4j implement the output addition, deletion and modification of sql statements without outputting query sql statements?

problem description

how do I make log4j output only add, delete and modify sql statements, not query sql statements?

the environmental background of the problems and what methods you have tried

now the project uses log4j to manage the log, which used to output all sql statements, but the new module of the project needs to execute a large number of queries, resulting in the log file being too large. Now you want to output only the addition, deletion and modification of the sql statement, not the query statement.
does any god know how to solve this problem?

May.08,2021

customize a filter , analyze the log contents and install them on the appropriate log processor ( file processor or console processor)

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e409f5-448d8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e409f5-448d8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?