
io.github.iac_m.jsonlogger.generated.config.JsonLoggerNamespaceHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of json-logger-connector
Show all versions of json-logger-connector
JSON Logger is a custom-made Mule logger component which allows user to efficiently log traceable messages and Mule variables in JSON format.
The newest version!
package io.github.iac_m.jsonlogger.generated.config;
import javax.annotation.Generated;
import org.mule.config.MuleManifest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.FatalBeanException;
import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
/**
* Registers bean definitions parsers for handling elements in http://www.mulesoft.org/schema/mule/json-logger
.
*
*/
@SuppressWarnings("all")
@Generated(value = "Mule DevKit Version 3.9.0", date = "2017-05-16T02:13:05+12:00", comments = "Build UNNAMED.2793.f49b6c7")
public class JsonLoggerNamespaceHandler
extends NamespaceHandlerSupport
{
private static Logger logger = LoggerFactory.getLogger(JsonLoggerNamespaceHandler.class);
private void handleException(String beanName, String beanScope, NoClassDefFoundError noClassDefFoundError) {
String muleVersion = "";
try {
muleVersion = MuleManifest.getProductVersion();
} catch (Exception _x) {
logger.error("Problem while reading mule version");
}
logger.error(((((("Cannot launch the mule app, the "+ beanScope)+" [")+ beanName)+"] within the connector [json-logger] is not supported in mule ")+ muleVersion));
throw new FatalBeanException(((((("Cannot launch the mule app, the "+ beanScope)+" [")+ beanName)+"] within the connector [json-logger] is not supported in mule ")+ muleVersion), noClassDefFoundError);
}
/**
* Invoked by the {@link DefaultBeanDefinitionDocumentReader} after construction but before any custom elements are parsed.
* @see NamespaceHandlerSupport#registerBeanDefinitionParser(String, BeanDefinitionParser)
*
*/
public void init() {
try {
this.registerBeanDefinitionParser("config", new JsonLoggerJsonLoggerConfigConfigDefinitionParser());
} catch (NoClassDefFoundError ex) {
handleException("config", "@Config", ex);
}
try {
this.registerBeanDefinitionParser("log", new LogDefinitionParser());
} catch (NoClassDefFoundError ex) {
handleException("log", "@Processor", ex);
}
try {
this.registerBeanDefinitionParser("log-all-properties", new LogAllPropertiesDefinitionParser());
} catch (NoClassDefFoundError ex) {
handleException("log-all-properties", "@Processor", ex);
}
try {
this.registerBeanDefinitionParser("log-exception", new LogExceptionDefinitionParser());
} catch (NoClassDefFoundError ex) {
handleException("log-exception", "@Processor", ex);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy