in components/camel-cxf/camel-cxf-all/src/main/java/org/apache/camel/component/cxf/ext/logging/osgi/Activator.java [70:123]
public void updated(Dictionary config) throws ConfigurationException {
boolean enabled = Boolean.valueOf(getValue(config, "enabled", "false"));
LOG.info("CXF message logging feature " + (enabled ? "enabled" : "disabled"));
Integer limit = Integer.valueOf(getValue(config, "limit", "65536"));
Boolean pretty = Boolean.valueOf(getValue(config, "pretty", "false"));
Boolean verbose = Boolean.valueOf(getValue(config, "verbose", "true"));
Long inMemThreshold = Long.valueOf(getValue(config, "inMemThresHold", "-1"));
Boolean logMultipart = Boolean.valueOf(getValue(config, "logMultipart", "true"));
Boolean logBinary = Boolean.valueOf(getValue(config, "logBinary", "false"));
Set<String> sensitiveElementNames = getTrimmedSet(config, "sensitiveElementNames");
Set<String> sensitiveProtocolHeaderNames = getTrimmedSet(config, "sensitiveProtocolHeaderNames");
if (limit != null) {
logging.setLimit(limit);
}
if (inMemThreshold != null) {
logging.setInMemThreshold(inMemThreshold);
}
if (pretty != null) {
logging.setPrettyLogging(pretty);
}
if (verbose != null) {
logging.setVerbose(verbose);
}
if (logMultipart != null) {
logging.setLogMultipart(logMultipart);
}
if (logBinary != null) {
logging.setLogBinary(logBinary);
}
logging.setSensitiveElementNames(sensitiveElementNames);
logging.setSensitiveProtocolHeaderNames(sensitiveProtocolHeaderNames);
if (intentReg == null) {
Dictionary<String, Object> properties = new Hashtable<>();
properties.put("org.apache.cxf.dosgi.IntentName", "logging");
bundleContext.registerService(AbstractFeature.class.getName(), logging, properties);
}
if (enabled) {
if (serviceReg == null) {
Dictionary<String, Object> properties = new Hashtable<>();
properties.put("name", "logging");
serviceReg = bundleContext.registerService(Feature.class.getName(), logging, properties);
}
} else {
if (serviceReg != null) {
serviceReg.unregister();
serviceReg = null;
}
}
}