How to output different business logs separately by logback

use logback to output logs. You want to output logs from different businesses to different files.

now there is a package com.manage.ddd. The business under this package is special and wants to be displayed separately from the logs of other modules.
but in actual development, the classes under com.manage.ddd call a large number of utility classes in other packages (all modules are called together). Can the logs in the tool classes be output to file a when called by classes under com.manage.ddd? Output to file b when classes in other packages are called

is now configured as follows:

  <!---->
<appender name="xjkUserAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
        <fileNamePattern>${log.path}/testLog222.%d{yyyy-MM-dd}.log</fileNamePattern>
        <maxHistory>12</maxHistory>
    </rollingPolicy>
    <encoder charset="UTF-8">
        <Pattern>${log.content}</Pattern>
    </encoder>
</appender>

  <logger name="com.controller.business.ElkLogsController" level="INFO" additivity="false">
    <appender-ref ref="xjkUserAppender"/>
   <!-- <appender-ref ref="xjkUserAppender"/>-->
</logger>

the above configuration can output the logs in ElkLogsController separately, but for the logs in the called tool class, it cannot be output separately

May.04,2021
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-1b36cf9-4d6e0.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-1b36cf9-4d6e0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?