@Override
        public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
            InstrumentClass mdcClass = instrumentor.getInstrumentClass(loader, "org.slf4j.MDC", null);

            if (mdcClass == null) {
                logger.warn("Can not modify. Because org.slf4j.MDC does not exist.");
                return null;
            }

            if (!mdcClass.hasMethod("put", "java.lang.String", "java.lang.String")) {
                logger.warn("Can not modify. Because put method does not exist at org.slf4j.MDC class.");
                return null;
            }
            if (!mdcClass.hasMethod("remove", "java.lang.String")) {
                logger.warn("Can not modify. Because remove method does not exist at org.slf4j.MDC class.");
                return null;
            }

            InstrumentClass target = instrumentor.getInstrumentClass(loader, className, classfileBuffer);

            if (!target.hasConstructor()) {
                logger.warn("Can not modify. Because constructor to modify not exist at ch.qos.logback.classic.spi.LoggingEvent class."
                        + "\nconstructor prototype : LoggingEvent();");
                return null;
            }
            if (!target.hasConstructor("java.lang.String", "ch.qos.logback.classic.Logger", "ch.qos.logback.classic.Level", "java.lang.String", "java.lang.Throwable", "java.lang.Object[]")) {
                logger.warn("Can not modify. Because constructor to modify not exist at ch.qos.logback.classic.spi.LoggingEvent class."
                        + "\nconstructor prototype : LoggingEvent(String fqcn, Logger logger, Level level, String message, Throwable throwable, Object[] argArray);");
                return null;
            }

            final Class<? extends Interceptor> interceptorClassName = LoggingEventOfLogbackInterceptor.class;
            addInterceptor(target, new String[0], interceptorClassName);
            addInterceptor(target, new String[]{"java.lang.String", "ch.qos.logback.classic.Logger", "ch.qos.logback.classic.Level", "java.lang.String", "java.lang.Throwable", "java.lang.Object[]"}, interceptorClassName);

            return target.toBytecode();
        }
This modifier support slf4j 1.4.1 version and logback 0.9.8 version, or greater.
Because package name of MDC class is different on under those version 
and under those version is too old.
By the way slf4j 1.4.0 version release on May 2007.
Refer to url http://mvnrepository.com/artifact/org.slf4j/slf4j-api for detail.

@author minwoo.jung
@author yjqg6666
agent-module/plugins/logback/src/main/java/com/navercorp/pinpoint/plugin/logback/LogbackPlugin.java