如果存在多个%d,则需要在不是作为分割时间的里面加上aux

"context" name="appLogPath"  source="appLogPath" defaultValue="/data/backup" />
    
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
            
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
              
<fileNamePattern>${appLogPath}/%d{yyyy-MM-dd,aux}/logFile.%d{yyyy-MM-dd_HH}.log</fileNamePattern>
              
<maxHistory>30</maxHistory>
            
</rollingPolicy>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>INFO</level>
<level>ERROR</level>
</filter>
<encoder>
<pattern>[%date{yyyy-MM-dd HH:mm:ss.SSS}][%-5level]-[%thread][requestId:%X{requestId}][imei:%X{imei}][%logger][username:%X{userName}]-%msg
%rootException %n</pattern>
</encoder>
          
</appender>