class TaskFlowRecordAppender extends AppenderBase<ILoggingEvent> {

    @Autowired
    private AssistRedisService assistRedisService;

    @Override
    protected void append(ILoggingEvent event) {
        if (event == null) {
            return;
        }
        Marker marker = event.getMarker();
        if (marker != null && marker.getName().equals(BaseTask.MARKER_NAME)) {
            String taskFlowId = event.getMDCPropertyMap().get(TaskConstants.TASK_STEP_FLOW_ID);
            if (StringUtils.isBlank(taskFlowId)) {
                return;
            }
            String customLog = generateCustomLog(event);
            String taskFlowIdKey = ConstUtils.getTaskFlowRedisKey(taskFlowId);
            assistRedisService.rpush(taskFlowIdKey, customLog);
        }
    }

    private String generateCustomLog(ILoggingEvent event) {<FILL_FUNCTION_BODY>}

    private String getSimpleClassName(String className) {
        int index = className.lastIndexOf(".");
        if (index >= 0) {
            return className.substring(index + 1);
        }
        return className;
    }

}

        Date date = new Date(event.getTimeStamp());
        String formatDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(date);
        String threadName = event.getThreadName();
        String logLevel = event.getLevel().toString();
        String className = event.getLoggerName();
        String simpleClassName = getSimpleClassName(className);
        String formatMessage = event.getFormattedMessage();
        return String.format("%s {%s} %s %s  - %s", formatDate, threadName, logLevel, simpleClassName, formatMessage);
    
<methods>public void <init>() ,public void addFilter(Filter<ch.qos.logback.classic.spi.ILoggingEvent>) ,public void clearAllFilters() ,public synchronized void doAppend(ch.qos.logback.classic.spi.ILoggingEvent) ,public List<Filter<ch.qos.logback.classic.spi.ILoggingEvent>> getCopyOfAttachedFiltersList() ,public ch.qos.logback.core.spi.FilterReply getFilterChainDecision(ch.qos.logback.classic.spi.ILoggingEvent) ,public java.lang.String getName() ,public boolean isStarted() ,public void setName(java.lang.String) ,public void start() ,public void stop() ,public java.lang.String toString() <variables>static final int ALLOWED_REPEATS,private int exceptionCount,private FilterAttachableImpl<ch.qos.logback.classic.spi.ILoggingEvent> fai,private boolean guard,protected java.lang.String name,protected volatile boolean started,private int statusRepeatCount