Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jeebendu opened this issue Nov 17, 2021 · 3 comments
Closed

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

jeebendu opened this issue Nov 17, 2021 · 3 comments

Comments

@jeebendu
Copy link

jeebendu commented Nov 17, 2021

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

@bluedenim
Copy link
Owner

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!

@bluedenim
Copy link
Owner

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

@jeebendu
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants