bluedenim/log4j-s3-search

Cannot end publish with com.van.logging.azure.BlobPublishHelper

jeebendu opened this issue · 3 comments

Cannot end publish with com.van.logging.azure.BlobPublishHelper@6d6174be due to error: org.apache.logging.log4j.core.layout.PatternLayout.serialize(Lorg/apache/logging/log4j/core/LogEvent;Ljava/lang/StringBuilder;)V

public class PatternedPathAdjuster implements IStorageDestinationAdjuster {

    @Override
    public String adjustPath(String path) {
        String adjusted = path;
        if (StringUtils.isTruthy(path)) {
            // e.g. "%d{yyyy-MM-dd}"
            StringBuilder sb = new StringBuilder();
            PatternLayout layout = PatternLayout.newBuilder().withPattern(path).build();
            MutableLogEvent evt = new MutableLogEvent();
            evt.setTimeMillis(System.currentTimeMillis());
            layout.serialize(evt, sb);
            adjusted = sb.toString();
        }
        return adjusted;
    }

}

Getting Error in layout.serialize(evt, sb);

i am using Spring 1.5.22-Release
com.therealvan-appender-log4j2 - 2.8.4

@bluedenim Can you suggest on it

Thanks for the info.

Can you do me a favor and run mvn dependency:tree and post here the output? Also: can you include a copy of your log4j config and pom.xml? They don't need to be exact. Please remove all confidential and irrelevant parts.

It will significantly help me investigate. Thanks!

Please consult #115 to see if you're in a similar situation. I'm closing this due to inactivity.

Its working
in some other dependency old log4j was used
now updated with latest and working