@Override
    public void setup(ProfilerPluginSetupContext context) {
        final Log4j2Config config = new Log4j2Config(context.getConfig());
        if (!config.isLog4j2LoggingTransactionInfo()) {
            logger.info("{} disabled", this.getClass().getSimpleName());
            return;
        }

        if (logger.isInfoEnabled()) {
            logger.info("Log4j2Plugin config:{}", config);
        }
        //for case : use SyncAppdender, use AsyncAppender, use Mixing Synchronous and Asynchronous Loggers
        transformTemplate.transform("org.apache.logging.log4j.core.impl.DefaultLogEventFactory", DefaultLogEventFactoryTransform.class);
        transformTemplate.transform("org.apache.logging.log4j.core.impl.ReusableLogEventFactory", ReusableLogEventFactoryTransform.class);

        //for case : Making All Loggers Asynchronous
        transformTemplate.transform("org.apache.logging.log4j.core.async.RingBufferLogEventTranslator", RingBufferLogEventTranslatorTransform.class);

        if (config.isPatternReplaceEnable()) {
            transformTemplate.transform("org.apache.logging.log4j.core.layout.PatternLayout$SerializerBuilder", LoggingPatternTransform.class);
        }

    }
@author https://github.com/licoco/pinpoint
@author yjqg6666
agent-module/plugins/log4j2/src/main/java/com/navercorp/pinpoint/plugin/log4j2/Log4j2Plugin.java