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

JsonTemplateLayout is not working WSO2 APIM 4.2.0 #3397

Open
dilshanfardil opened this issue Nov 28, 2024 · 0 comments
Open

JsonTemplateLayout is not working WSO2 APIM 4.2.0 #3397

dilshanfardil opened this issue Nov 28, 2024 · 0 comments
Labels

Comments

@dilshanfardil
Copy link

Description

Hi Team,

Description

We are getting this ERROR When we use the JsonTemplateLayout

org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Unable to locate plugin type for JsonTemplateLayout
org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Unable to locate plugin for JsonTemplateLayout
org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.NullPointerException: Cannot invoke "org.apache.logging.log4j.core.config.plugins.util.PluginType.getElementName()" because "childType" is null
org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender
org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Null object returned for RollingFile in Appenders.

Steps to Reproduce

Steps to reproduce the issue

  1. Add these configration to the log4j2.properties file
appender.CARBON_LOGFILE.layout.type = JsonTemplateLayout
  1. In <WSO2_HOME> directory, keep the below pattern in a file.
{
    "instant": {
        "epochSecond": {
            "$resolver": "timestamp",
            "epoch": {
                "unit": "secs",
                "rounded": true
            }
        }
    },
    "contextMap": {
        "$resolver": "mdc",
        "stringified": true
    }
}
  1. Restart the server

Version

4.2.0

Environment Details (with versions)

No response

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

No branches or pull requests

1 participant