You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by jb...@apache.org on 2011/02/06 22:04:45 UTC
svn commit: r1067761 - in /servicemix/components/trunk:
engines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/
engines/servicemix-eip/src/test/java/org/apache/servicemix/eip/
engines/servicemix-exec/src/main/java/org/apache/servicemix/...
Author: jbonofre
Date: Sun Feb 6 21:04:44 2011
New Revision: 1067761
URL: http://svn.apache.org/viewvc?rev=1067761&view=rev
Log:
[SMXCOMP-852] Use SLF4J args to avoid string concatenation.
Modified:
servicemix/components/trunk/engines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/AbstractAggregator.java
servicemix/components/trunk/engines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/SwitchPredicate.java
servicemix/components/trunk/engines/servicemix-eip/src/test/java/org/apache/servicemix/eip/MessageFilterSwitchPredicateTest.java
servicemix/components/trunk/engines/servicemix-exec/src/main/java/org/apache/servicemix/exec/ExecEndpoint.java
servicemix/components/trunk/engines/servicemix-exec/src/main/java/org/apache/servicemix/exec/utils/ExecUtils.java
servicemix/components/trunk/engines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181Endpoint.java
servicemix/components/trunk/engines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/xfire/JbiProxy.java
servicemix/components/trunk/engines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/xfire/JbiTransport.java
servicemix/components/trunk/engines/servicemix-osworkflow/src/main/java/org/apache/servicemix/osworkflow/OSWorkflow.java
servicemix/components/trunk/engines/servicemix-osworkflow/src/test/java/org/apache/servicemix/osworkflow/functions/ExampleFunction.java
servicemix/components/trunk/engines/servicemix-quartz/src/main/java/org/apache/servicemix/quartz/QuartzEndpoint.java
servicemix/components/trunk/engines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingEndpoint.java
servicemix/components/trunk/engines/servicemix-wsn2005/src/main/java/org/apache/servicemix/wsn/component/WSNComponent.java
servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/AsyncBaseLifeCycle.java
servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/BaseComponent.java
servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/DefaultComponent.java
servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/PollingEndpoint.java
servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/osgi/Configuration.java
servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/osgi/EndpointExporter.java
servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/tools/wsdl/SchemaCollection.java
servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/AbstractXBeanDeployer.java
servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/ClassLoaderXmlPreprocessor.java
servicemix/components/trunk/shared-libraries/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapEndpoint.java
servicemix/components/trunk/shared-libraries/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapHelper.java
servicemix/components/trunk/shared-libraries/servicemix-soap/src/test/java/org/apache/servicemix/soap/handlers/security/WSSecurityHandlerTest.java
servicemix/components/trunk/shared-libraries/servicemix-soap/src/test/java/org/apache/servicemix/soap/marshalers/FaultTest.java
servicemix/components/trunk/shared-libraries/servicemix-soap2/src/main/java/org/apache/servicemix/soap/core/PhaseInterceptorChain.java
Modified: servicemix/components/trunk/engines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/AbstractAggregator.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/AbstractAggregator.java?rev=1067761&r1=1067760&r2=1067761&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/AbstractAggregator.java (original)
+++ servicemix/components/trunk/engines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/AbstractAggregator.java Sun Feb 6 21:04:44 2011
@@ -343,9 +343,7 @@ public abstract class AbstractAggregator
} else {
store.store(correlationId, aggregation);
if (timeout != null) {
- if (logger.isDebugEnabled()) {
- logger.debug("Scheduling timeout at " + timeout + " for aggregate " + correlationId);
- }
+ logger.debug("Scheduling timeout at {} for aggregate {}", timeout, correlationId);
Timer t = getTimerManager().schedule(new TimerListener() {
public void timerExpired(Timer timer) {
AbstractAggregator.this.onTimeout(processCorrelationId, correlationId, timer);
@@ -400,7 +398,7 @@ public abstract class AbstractAggregator
}
protected void onTimeout(String processCorrelationId, String correlationId, Timer timer) {
- logger.debug("Timeout expired for aggregate " + correlationId);
+ logger.debug("Timeout expired for aggregate {}", correlationId);
Lock lock = getLockManager().getLock(correlationId);
lock.lock();
try {
@@ -429,7 +427,7 @@ public abstract class AbstractAggregator
} else if (!isAggregationClosed(correlationId)) {
throw new IllegalStateException("Aggregation is not closed, but can not be retrieved from the store");
} else {
- logger.debug("Aggregate " + correlationId + " is closed");
+ logger.debug("Aggregate {} is closed", correlationId);
}
} catch (Exception e) {
logger.info("Caught exception while processing timeout aggregation", e);
Modified: servicemix/components/trunk/engines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/SwitchPredicate.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/SwitchPredicate.java?rev=1067761&r1=1067760&r2=1067761&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/SwitchPredicate.java (original)
+++ servicemix/components/trunk/engines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/SwitchPredicate.java Sun Feb 6 21:04:44 2011
@@ -61,9 +61,7 @@ public class SwitchPredicate implements
if (propertyResource != null && propertyResource.exists()) {
// get property from properties file
propertyFile = propertyResource.getFile();
- if (logger.isDebugEnabled()) {
- logger.debug("loading property file: " + propertyFile.getAbsolutePath());
- }
+ logger.debug("loading property file: {}", propertyFile.getAbsolutePath());
props = new Properties();
props.load(propertyResource.getInputStream());
} else {
Modified: servicemix/components/trunk/engines/servicemix-eip/src/test/java/org/apache/servicemix/eip/MessageFilterSwitchPredicateTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-eip/src/test/java/org/apache/servicemix/eip/MessageFilterSwitchPredicateTest.java?rev=1067761&r1=1067760&r2=1067761&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-eip/src/test/java/org/apache/servicemix/eip/MessageFilterSwitchPredicateTest.java (original)
+++ servicemix/components/trunk/engines/servicemix-eip/src/test/java/org/apache/servicemix/eip/MessageFilterSwitchPredicateTest.java Sun Feb 6 21:04:44 2011
@@ -54,9 +54,9 @@ public class MessageFilterSwitchPredicat
// Message exchange turned off - message should NOT reach the target.
me.getInMessage().setContent(createSource("<orderIn><widget>5</widget></orderIn>"));
me.getInMessage().setProperty("on", Boolean.FALSE);
- logger.info("Before client.sendSync me.getProperty(\"on\") is: " + me.getProperty("on"));
+ logger.info("Before client.sendSync me.getProperty(\"on\") is: {} ", me.getProperty("on"));
client.sendSync(me);
- logger.info("After client.sendSync me.getProperty(\"on\" is: " + me.getProperty("on"));
+ logger.info("After client.sendSync me.getProperty(\"on\" is: {}", me.getProperty("on"));
assertEquals("Message exchange status should be DONE", ExchangeStatus.DONE, me.getStatus());
rec.getMessageList().assertMessagesReceived(0);
Modified: servicemix/components/trunk/engines/servicemix-exec/src/main/java/org/apache/servicemix/exec/ExecEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-exec/src/main/java/org/apache/servicemix/exec/ExecEndpoint.java?rev=1067761&r1=1067760&r2=1067761&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-exec/src/main/java/org/apache/servicemix/exec/ExecEndpoint.java (original)
+++ servicemix/components/trunk/engines/servicemix-exec/src/main/java/org/apache/servicemix/exec/ExecEndpoint.java Sun Feb 6 21:04:44 2011
@@ -194,9 +194,7 @@ public class ExecEndpoint extends Provid
// try to extract the command from the in message content
if (exchange.getMessage("in") != null) {
// in message presents
- if (logger.isDebugEnabled()) {
- logger.debug("Received exchange: " + exchange);
- }
+ logger.debug("Received exchange: {}", exchange);
// gets the in message
NormalizedMessage in = exchange.getMessage("in");
Modified: servicemix/components/trunk/engines/servicemix-exec/src/main/java/org/apache/servicemix/exec/utils/ExecUtils.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-exec/src/main/java/org/apache/servicemix/exec/utils/ExecUtils.java?rev=1067761&r1=1067760&r2=1067761&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-exec/src/main/java/org/apache/servicemix/exec/utils/ExecUtils.java (original)
+++ servicemix/components/trunk/engines/servicemix-exec/src/main/java/org/apache/servicemix/exec/utils/ExecUtils.java Sun Feb 6 21:04:44 2011
@@ -54,7 +54,7 @@ public class ExecUtils {
exec = exec + " " + argument;
}
- logger.info("Execute command " + exec);
+ logger.info("Execute command {}", exec);
String[] shellCommand = null;
logger.debug("Define the shell.");
logger.debug("Get the OS name property.");
@@ -63,7 +63,7 @@ public class ExecUtils {
logger.debug("Microsoft Windows platform detected.");
String comSpec = System.getProperty("ComSpec");
if (comSpec != null) {
- logger.debug("The ComSpec MS Windows environment variable is defined, using it: " + comSpec + " /C " + exec);
+ logger.debug("The ComSpec MS Windows environment variable is defined, using it: {} /C {}", comSpec, exec);
shellCommand = new String[] { comSpec, "/C", exec };
} else {
logger.debug("The ComSpec MS Windows environment variable is not defined, found the shell command depending of the MS Windows version.");
@@ -71,10 +71,10 @@ public class ExecUtils {
|| osName.startsWith("Windows 95")
|| osName.startsWith("Windows 98")
|| osName.startsWith("Windows ME")) {
- logger.debug("MS Windows 3.1/95/98/Me detected, using: command.com /C " + exec);
+ logger.debug("MS Windows 3.1/95/98/Me detected, using: command.com /C {}", exec);
shellCommand = new String[] { "command.com", "/C", exec };
} else {
- logger.debug("MS Windows NT/XP/Vista detected, using: cmd.exe /C " + exec);
+ logger.debug("MS Windows NT/XP/Vista detected, using: cmd.exe /C {}", exec);
shellCommand = new String[] { "cmd.exe", "/C", exec };
}
}
@@ -82,10 +82,10 @@ public class ExecUtils {
logger.debug("Unix platform detected.");
String shell = System.getProperty("SHELL");
if (shell != null) {
- logger.debug("The SHELL Unix environment variable is defined, using it: " + shell + " -c " + exec);
+ logger.debug("The SHELL Unix environment variable is defined, using it: {} -c {}", shell, exec);
shellCommand = new String[] { shell, "-c", exec };
} else {
- logger.debug("The SHELL Unix environment variable is not defined, using the default Unix shell: /bin/sh -c " + exec);
+ logger.debug("The SHELL Unix environment variable is not defined, using the default Unix shell: /bin/sh -c {}", exec);
shellCommand = new String[] { "/bin/sh", "-c", exec };
}
}
@@ -115,13 +115,13 @@ public class ExecUtils {
if (exitValue != 0) {
// an error occured
- logger.error("Command " + exec + " execution failed with return code " + exitValue + " : " + execResponse.getErrorData().toString());
+ logger.error("Command {} execution failed with return code {}", exec, exitValue);
} else {
// command was successful
- logger.debug("Command " + exec + " execution completed: " + execResponse.getOutputData().toString());
+ logger.debug("Command {} execution completed: {}", exec, execResponse.getOutputData().toString());
}
} catch (Exception exception) {
- logger.error("Command " + exec + " execution failed.", exception);
+ logger.error("Command {} execution failed.", exec, exception);
throw new ExecException("Command " + exec + " execution failed.", exception);
}
@@ -164,7 +164,7 @@ class StreamGobbler extends Thread {
response.append('\n');
}
} catch (IOException ioException) {
- logger.warn("System command stream gobbler error : " + ioException.getMessage());
+ logger.warn("System command stream gobbler error : {}", ioException.getMessage());
}
}
Modified: servicemix/components/trunk/engines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181Endpoint.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181Endpoint.java?rev=1067761&r1=1067760&r2=1067761&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181Endpoint.java (original)
+++ servicemix/components/trunk/engines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181Endpoint.java Sun Feb 6 21:04:44 2011
@@ -233,13 +233,13 @@ public class Jsr181Endpoint extends Prov
Method mth = pojo.getClass().getMethod("setContext", new Class[] {ComponentContext.class });
mth.invoke(pojo, new Object[] {context });
} catch (Exception e) {
- logger.debug("Unable to inject ComponentContext: " + e.getMessage());
+ logger.debug("Unable to inject ComponentContext: {}", e.getMessage());
}
try {
Method mth = pojo.getClass().getMethod("setContainer", new Class[] {Container.class });
mth.invoke(pojo, new Object[] {container });
} catch (Exception e) {
- logger.debug("Unable to inject JBIContainer: " + e.getMessage());
+ logger.debug("Unable to inject JBIContainer: {}", e.getMessage());
}
}
@@ -250,7 +250,7 @@ public class Jsr181Endpoint extends Prov
field.setAccessible(true);
return (Container) field.get(ctx);
} catch (Exception e) {
- logger.debug("Unable to retrieve JBIContainer: " + e.getMessage());
+ logger.debug("Unable to retrieve JBIContainer: {}", e.getMessage());
return null;
}
}
@@ -348,16 +348,12 @@ public class Jsr181Endpoint extends Prov
if (service == null) {
service = serviceName;
} else if (!service.equals(serviceName)) {
- logger.warn("The service name defined in the wsdl (" + serviceName
- + ") does not match the service name defined in the endpoint spec (" + service
- + "). WSDL description may be unusable.");
+ logger.warn("The service name defined in the wsdl ({}) does not match the service name defined in the endpoint spec ({}). WSDL description may be unusable.", serviceName, service);
}
if (interfaceName == null) {
interfaceName = interfName;
} else if (!interfaceName.equals(interfName)) {
- logger.warn("The interface name defined in the wsdl (" + interfName
- + ") does not match the service name defined in the endpoint spec (" + interfaceName
- + "). WSDL description may be unusable.");
+ logger.warn("The interface name defined in the wsdl ({}) does not match the service name defined in the endpoint spec ({}). WSDL description may be unusable.", interfName, interfaceName);
}
// Parse the WSDL
@@ -387,11 +383,9 @@ public class Jsr181Endpoint extends Prov
description = WSDLFactory.newInstance().newWSDLWriter().getDocument(definition);
// Write WSDL
- if (logger.isDebugEnabled()) {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- WSDLFactory.newInstance().newWSDLWriter().writeWSDL(definition, baos);
- logger.debug(baos.toString());
- }
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ WSDLFactory.newInstance().newWSDLWriter().writeWSDL(definition, baos);
+ logger.debug("{}", baos.toString());
}
protected void updateDescription() throws Exception {
Modified: servicemix/components/trunk/engines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/xfire/JbiProxy.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/xfire/JbiProxy.java?rev=1067761&r1=1067760&r2=1067761&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/xfire/JbiProxy.java (original)
+++ servicemix/components/trunk/engines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/xfire/JbiProxy.java Sun Feb 6 21:04:44 2011
@@ -261,7 +261,7 @@ public class JbiProxy {
detail.getName());
Class<?>[] exceptions = method.getExceptionTypes();
for (int i = 0; i < exceptions.length; i++) {
- logger.debug("Checking exception: " + exceptions[i]);
+ logger.debug("Checking exception: {}", exceptions[i]);
WebFault wf = exceptions[i].getAnnotation(WebFault.class);
if (wf == null) {
logger.debug("No WebFault annotation");
@@ -282,10 +282,10 @@ public class JbiProxy {
Constructor<?> cst = exceptions[i].getConstructor(String.class, infoClass);
return (Exception) cst.newInstance(xfireFault.toString(), obj.getValue());
} catch (Throwable e) {
- logger.debug("Error: " + e);
+ logger.debug("Error: {}", e);
}
} else {
- logger.debug("QName mismatch: element: " + qname + ", exception: " + exceptionName);
+ logger.debug("QName mismatch: element: {}, execption: {}", qname, exceptionName);
}
}
return t;
Modified: servicemix/components/trunk/engines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/xfire/JbiTransport.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/xfire/JbiTransport.java?rev=1067761&r1=1067760&r2=1067761&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/xfire/JbiTransport.java (original)
+++ servicemix/components/trunk/engines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/xfire/JbiTransport.java Sun Feb 6 21:04:44 2011
@@ -59,7 +59,7 @@ public class JbiTransport extends Abstra
}
protected Channel createNewChannel(String uri) {
- logger.debug("Creating new channel for uri: " + uri);
+ logger.debug("Creating new channel for uri: {}", uri);
JbiChannel c = new JbiChannel(uri, this);
c.setEndpoint(new DefaultEndpoint());
return c;
Modified: servicemix/components/trunk/engines/servicemix-osworkflow/src/main/java/org/apache/servicemix/osworkflow/OSWorkflow.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-osworkflow/src/main/java/org/apache/servicemix/osworkflow/OSWorkflow.java?rev=1067761&r1=1067760&r2=1067761&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-osworkflow/src/main/java/org/apache/servicemix/osworkflow/OSWorkflow.java (original)
+++ servicemix/components/trunk/engines/servicemix-osworkflow/src/main/java/org/apache/servicemix/osworkflow/OSWorkflow.java Sun Feb 6 21:04:44 2011
@@ -124,13 +124,11 @@ public class OSWorkflow implements Runna
// call the endpoint method for init actions
this.endpoint.preWorkflow();
- if (logger.isDebugEnabled()) {
- logger.debug("Starting workflow...");
- logger.debug("Name: " + this.osWorkflowName);
- logger.debug("Action: " + this.action);
- logger.debug("Caller: " + this.caller);
- logger.debug("Map: " + this.map);
- }
+ logger.debug("Starting workflow...");
+ logger.debug("Name: {}", this.osWorkflowName);
+ logger.debug("Action: {}", this.action);
+ logger.debug("Caller: {}", this.caller);
+ logger.debug("Map: {}", this.map);
// loop as long as there are more actions to do and the workflow is not
// finished or aborted
@@ -172,15 +170,13 @@ public class OSWorkflow implements Runna
}
}
- if (logger.isDebugEnabled()) {
- logger.debug("Stopping workflow...");
- logger.debug("Name: " + this.osWorkflowName);
- logger.debug("Action: " + this.action);
- logger.debug("Caller: " + this.caller);
- logger.debug("Map: " + this.map);
- logger.debug("WorkflowId: " + this.workflowId);
- logger.debug("End state: " + (finished ? "Finished" : "Aborted"));
- }
+ logger.debug("Stopping workflow...");
+ logger.debug("Name: {}", this.osWorkflowName);
+ logger.debug("Action: {}", this.action);
+ logger.debug("Caller: {}", this.caller);
+ logger.debug("Map: {}", this.map);
+ logger.debug("WorkflowId: {}", this.workflowId);
+ logger.debug("End state: {}", (finished ? "Finished" : "Aborted"));
// call the endpoint method for cleanup actions or message exchange
this.endpoint.postWorkflow();
Modified: servicemix/components/trunk/engines/servicemix-osworkflow/src/test/java/org/apache/servicemix/osworkflow/functions/ExampleFunction.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-osworkflow/src/test/java/org/apache/servicemix/osworkflow/functions/ExampleFunction.java?rev=1067761&r1=1067760&r2=1067761&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-osworkflow/src/test/java/org/apache/servicemix/osworkflow/functions/ExampleFunction.java (original)
+++ servicemix/components/trunk/engines/servicemix-osworkflow/src/test/java/org/apache/servicemix/osworkflow/functions/ExampleFunction.java Sun Feb 6 21:04:44 2011
@@ -106,7 +106,7 @@ public class ExampleFunction implements
if (exampleNode != null) {
String value = exampleNode.getTextContent();
- logger.info("Received content: " + value);
+ logger.info("Received content: {}", value);
propertySet.setString("ExampleKey", value);
} else {
throw new WorkflowException(
Modified: servicemix/components/trunk/engines/servicemix-quartz/src/main/java/org/apache/servicemix/quartz/QuartzEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-quartz/src/main/java/org/apache/servicemix/quartz/QuartzEndpoint.java?rev=1067761&r1=1067760&r2=1067761&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-quartz/src/main/java/org/apache/servicemix/quartz/QuartzEndpoint.java (original)
+++ servicemix/components/trunk/engines/servicemix-quartz/src/main/java/org/apache/servicemix/quartz/QuartzEndpoint.java Sun Feb 6 21:04:44 2011
@@ -143,9 +143,7 @@ public class QuartzEndpoint extends Cons
}
public void onJobExecute(JobExecutionContext context) throws JobExecutionException {
- if (logger.isDebugEnabled()) {
- logger.debug("Firing Quartz Job with context: " + context);
- }
+ logger.debug("Firing Quartz Job with context: {}", context);
try {
InOnly exchange = getExchangeFactory().createInOnlyExchange();
NormalizedMessage message = exchange.createMessage();
Modified: servicemix/components/trunk/engines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingEndpoint.java?rev=1067761&r1=1067760&r2=1067761&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingEndpoint.java (original)
+++ servicemix/components/trunk/engines/servicemix-scripting/src/main/java/org/apache/servicemix/scripting/ScriptingEndpoint.java Sun Feb 6 21:04:44 2011
@@ -272,8 +272,7 @@ public class ScriptingEndpoint extends P
try {
is = this.marshaler.getScriptCode(this, exchange);
} catch (IOException ioex) {
- logger.error("Unable to load script in marshaler: "
- + this.marshaler.getClass().getName(), ioex);
+ logger.error("Unable to load script in marshaler: {}", this.marshaler.getClass().getName(), ioex);
}
// if the marshaler does not return a valid input stream, use the script property to load it
if (is != null) {
@@ -299,7 +298,7 @@ public class ScriptingEndpoint extends P
engine.eval(new InputStreamReader(this.script.getInputStream()), scriptBindings);
}
} catch (IOException ioex) {
- logger.error("Unable to load the script " + script.getFilename(), ioex);
+ logger.error("Unable to load the script {}", script.getFilename(), ioex);
throw new MessagingException("Unable to load the script " + script.getFilename());
} catch (ScriptException ex) {
logger.error("Error executing the script: " + ex.getFileName() + " at line: "
Modified: servicemix/components/trunk/engines/servicemix-wsn2005/src/main/java/org/apache/servicemix/wsn/component/WSNComponent.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-wsn2005/src/main/java/org/apache/servicemix/wsn/component/WSNComponent.java?rev=1067761&r1=1067760&r2=1067761&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-wsn2005/src/main/java/org/apache/servicemix/wsn/component/WSNComponent.java (original)
+++ servicemix/components/trunk/engines/servicemix-wsn2005/src/main/java/org/apache/servicemix/wsn/component/WSNComponent.java Sun Feb 6 21:04:44 2011
@@ -184,24 +184,18 @@ public class WSNComponent extends Defaul
*/
@Override
public Document getServiceDescription(ServiceEndpoint endpoint) {
- if (logger.isDebugEnabled()) {
- logger.debug("Querying service description for " + endpoint);
- }
+ logger.debug("Querying service description for {}", endpoint);
String key = EndpointSupport.getKey(endpoint);
Endpoint ep = this.registry.getEndpoint(key);
if (ep != null) {
QName interfaceName = ep.getInterfaceName();
if (interfaceName == null) {
- if (logger.isDebugEnabled()) {
- logger.debug("Could not retrieve description for endpoint " + key + " (no interface defined)");
- }
+ logger.debug("Could not retrieve description for endpoint {} (no interface defined)", key);
return null;
}
return getDescription(interfaceName);
} else {
- if (logger.isDebugEnabled()) {
- logger.debug("No endpoint found for " + key);
- }
+ logger.debug("No endpoint found for {}", key);
return null;
}
}
@@ -246,9 +240,7 @@ public class WSNComponent extends Defaul
}
return doc;
} catch (Exception e) {
- if (logger.isDebugEnabled()) {
- logger.debug("Error retrieving endpoint description", e);
- }
+ logger.debug("Error retrieving endpoint description", e);
return null;
}
}
Modified: servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/AsyncBaseLifeCycle.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/AsyncBaseLifeCycle.java?rev=1067761&r1=1067760&r2=1067761&view=diff
==============================================================================
--- servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/AsyncBaseLifeCycle.java (original)
+++ servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/AsyncBaseLifeCycle.java Sun Feb 6 21:04:44 2011
@@ -484,7 +484,7 @@ public class AsyncBaseLifeCycle implemen
}
processExchange(exchange);
} catch (Throwable t) {
- logger.error("Error processing exchange " + exchange, t);
+ logger.error("Error processing exchange {}", exchange, t);
try {
// If we are transacted, check if this exception should
// rollback the transaction
@@ -543,7 +543,7 @@ public class AsyncBaseLifeCycle implemen
try {
processExchange(exchange);
} catch (Throwable t) {
- logger.error("Error processing exchange " + exchange, t);
+ logger.error("Error processing exchange {}", exchange, t);
try {
// If we are transacted and this is a runtime exception
// try to mark transaction as rollback
@@ -566,8 +566,7 @@ public class AsyncBaseLifeCycle implemen
}
protected void processExchange(MessageExchange exchange) throws Exception {
- logger.debug("Received exchange: status: " + exchange.getStatus() + ", role: "
- + (exchange.getRole() == Role.CONSUMER ? "consumer" : "provider"));
+ logger.debug("Received exchange: status: {}, role: {}", exchange.getStatus(), (exchange.getRole() == Role.CONSUMER ? "consumer" : "provider"));
if (exchange.getRole() == Role.PROVIDER) {
boolean dynamic = false;
ServiceEndpoint endpoint = exchange.getEndpoint();
@@ -625,7 +624,7 @@ public class AsyncBaseLifeCycle implemen
// Set the id in threadlocal variable
correlationId.set(correlationID);
}
- logger.debug("Retrieved correlation id: " + correlationID);
+ logger.debug("Retrieved correlation id: {}", correlationID);
EndpointDeliveryChannel.setEndpoint(ep);
handleExchange(ep, exchange, exchange.getStatus() == ExchangeStatus.ACTIVE);
ep.process(exchange);
@@ -653,11 +652,11 @@ public class AsyncBaseLifeCycle implemen
// to trace the process instance
correlationIDValue = exchange.getExchangeId();
exchange.setProperty(JbiConstants.CORRELATION_ID, exchange.getExchangeId());
- logger.debug("Created correlation id: " + correlationIDValue);
+ logger.debug("Created correlation id: {}", correlationIDValue);
} else {
// Use correlation id retrieved from previous message exchange
exchange.setProperty(JbiConstants.CORRELATION_ID, correlationIDValue);
- logger.debug("Correlation id retrieved from ThreadLocal: " + correlationIDValue);
+ logger.debug("Correlation id retrieved from ThreadLocal: {}", correlationIDValue);
}
}
// Set the sender endpoint property
@@ -700,7 +699,7 @@ public class AsyncBaseLifeCycle implemen
synchronized (exchanges) {
if (!exchanges.isEmpty()) {
for (String id : exchanges) {
- logger.debug("Waiting for exchange " + id + " in " + endpoint);
+ logger.debug("Waiting for exchange {} in {}", id, endpoint);
}
exchanges.wait(timeout);
logger.debug(String.format("Gave up waiting for %s exchanges in %s after %s ms",
Modified: servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/BaseComponent.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/BaseComponent.java?rev=1067761&r1=1067760&r2=1067761&view=diff
==============================================================================
--- servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/BaseComponent.java (original)
+++ servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/BaseComponent.java Sun Feb 6 21:04:44 2011
@@ -73,17 +73,17 @@ public abstract class BaseComponent impl
* @see javax.jbi.component.Component#getServiceDescription(javax.jbi.servicedesc.ServiceEndpoint)
*/
public Document getServiceDescription(ServiceEndpoint endpoint) {
- logger.debug("Querying service description for " + endpoint);
+ logger.debug("Querying service description for {}", endpoint);
String key = EndpointSupport.getKey(endpoint);
Endpoint ep = this.registry.getEndpoint(key);
if (ep != null) {
Document doc = ep.getDescription();
if (doc == null) {
- logger.debug("No description found for " + key);
+ logger.debug("No description found for {}", key);
}
return doc;
} else {
- logger.debug("No endpoint found for " + key);
+ logger.debug("No endpoint found for {}", key);
return null;
}
}
@@ -96,13 +96,13 @@ public abstract class BaseComponent impl
Endpoint ep = this.registry.getEndpoint(key);
if (ep != null) {
if (ep.getRole() != Role.PROVIDER) {
- logger.debug("Endpoint " + key + " is a consumer. Refusing exchange with consumer.");
+ logger.debug("Endpoint {} is a consumer. Refusing exchange with consumer.", key);
return false;
} else {
return ep.isExchangeOkay(exchange);
}
} else {
- logger.debug("No endpoint found for " + key + ". Refusing exchange with consumer.");
+ logger.debug("No endpoint found for {}. Refusing exchange with consumer.", key);
return false;
}
}
Modified: servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/DefaultComponent.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/DefaultComponent.java?rev=1067761&r1=1067760&r2=1067761&view=diff
==============================================================================
--- servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/DefaultComponent.java (original)
+++ servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/DefaultComponent.java Sun Feb 6 21:04:44 2011
@@ -95,18 +95,18 @@ public class DefaultComponent extends As
* @see javax.jbi.component.Component#getServiceDescription(javax.jbi.servicedesc.ServiceEndpoint)
*/
public Document getServiceDescription(ServiceEndpoint endpoint) {
- logger.debug("Querying service description for " + endpoint);
+ logger.debug("Querying service description for {}", endpoint);
String key = EndpointSupport.getKey(endpoint);
Endpoint ep = this.registry.getEndpoint(key);
if (ep != null) {
Document doc = ep.getDescription();
if (doc == null) {
- logger.debug("No description found for " + key);
+ logger.debug("No description found for {}", key);
}
return doc;
}
else {
- logger.debug("No endpoint found for " + key);
+ logger.debug("No endpoint found for {}", key);
return null;
}
}
@@ -119,7 +119,7 @@ public class DefaultComponent extends As
Endpoint ep = this.registry.getEndpoint(key);
if (ep != null) {
if (ep.getRole() != MessageExchange.Role.PROVIDER) {
- logger.debug("Endpoint " + key + " is a consumer. Refusing exchange with consumer.");
+ logger.debug("Endpoint {} is a consumer. Refusing exchange with consumer.", key);
return false;
}
else {
@@ -127,7 +127,7 @@ public class DefaultComponent extends As
}
}
else {
- logger.debug("No endpoint found for " + key + ". Refusing exchange with consumer.");
+ logger.debug("No endpoint found for {}. Refusing exchange with consumer.", key);
return false;
}
}
@@ -334,7 +334,7 @@ public class DefaultComponent extends As
while (iter.hasNext()) {
Endpoint endpoint = (Endpoint) iter.next();
if (endpoint == null) {
- logger.warn("Ignoring null endpoint in list: " + endpoints);
+ logger.warn("Ignoring null endpoint in list: {}", endpoints);
continue;
}
addEndpoint(endpoint);
Modified: servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/PollingEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/PollingEndpoint.java?rev=1067761&r1=1067760&r2=1067761&view=diff
==============================================================================
--- servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/PollingEndpoint.java (original)
+++ servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/PollingEndpoint.java Sun Feb 6 21:04:44 2011
@@ -230,14 +230,14 @@ public abstract class PollingEndpoint ex
});
}
catch (Throwable e) {
- logger.error("Failed to schedule work: " + e, e);
+ logger.error("Failed to schedule work: {}", e, e);
pollActive.set(false);
}
}
}
protected void handlePollException(Exception e) {
- logger.error("Caught exception while polling: " + e, e);
+ logger.error("Caught exception while polling: {}", e, e);
}
Modified: servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/osgi/Configuration.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/osgi/Configuration.java?rev=1067761&r1=1067760&r2=1067761&view=diff
==============================================================================
--- servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/osgi/Configuration.java (original)
+++ servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/osgi/Configuration.java Sun Feb 6 21:04:44 2011
@@ -53,7 +53,7 @@ public class Configuration {
* @see org.apache.servicemix.executors.impl.ExecutorConfig#setCorePoolSize(int)
*/
public void setCorePoolSize(int size) {
- logger.debug("Setting core thread pool size: " + size);
+ logger.debug("Setting core thread pool size: {}", size);
executorConfig.setCorePoolSize(size);
}
@@ -62,7 +62,7 @@ public class Configuration {
* @see org.apache.servicemix.executors.impl.ExecutorConfig#setMaximumPoolSize(int)
*/
public void setMaximumPoolSize(int size) {
- logger.debug("Setting maximum thread pool size: " + size);
+ logger.debug("Setting maximum thread pool size: {}", size);
executorConfig.setMaximumPoolSize(size);
}
@@ -71,7 +71,7 @@ public class Configuration {
* @see org.apache.servicemix.executors.impl.ExecutorConfig#setQueueSize(int)
*/
public void setQueueSize(int size) {
- logger.debug("Setting executor queue size: " + size);
+ logger.debug("Setting executor queue size: {}", size);
executorConfig.setQueueSize(size);
}
@@ -80,7 +80,7 @@ public class Configuration {
* @see org.apache.servicemix.executors.impl.ExecutorConfig#setAllowCoreThreadsTimeout(boolean)
*/
public void setAllowCoreThreadTimeout(boolean timeout) {
- logger.debug("Setting core thread timeout allow: " + timeout);
+ logger.debug("Setting core thread timeout allow: {}", timeout);
executorConfig.setAllowCoreThreadsTimeout(timeout);
}
@@ -89,7 +89,7 @@ public class Configuration {
* @see org.apache.servicemix.executors.impl.ExecutorConfig#setKeepAliveTime(long)
*/
public void setKeepAliveTime(int time) {
- logger.debug("Setting thread keep-alive time: " + time);
+ logger.debug("Setting thread keep-alive time: {}", time);
executorConfig.setKeepAliveTime(time);
}
Modified: servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/osgi/EndpointExporter.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/osgi/EndpointExporter.java?rev=1067761&r1=1067760&r2=1067761&view=diff
==============================================================================
--- servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/osgi/EndpointExporter.java (original)
+++ servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/osgi/EndpointExporter.java Sun Feb 6 21:04:44 2011
@@ -133,7 +133,7 @@ public class EndpointExporter implements
}
if (ep != null && (ep.getServiceUnit() == null
|| !ep.getServiceUnit().getComponent().getRegistry().isRegistered(ep.getServiceUnit()))) {
- logger.info("something wrong during register endpoint " + ep.getKey());
+ logger.info("something wrong during register endpoint {}", ep.getKey());
//get chance to unregister all endpoints with this EndpointExporter
for (Endpoint e : deployed) {
e.getServiceUnit().getComponent().getRegistry().unregisterServiceUnit(e.getServiceUnit());
Modified: servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/tools/wsdl/SchemaCollection.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/tools/wsdl/SchemaCollection.java?rev=1067761&r1=1067760&r2=1067761&view=diff
==============================================================================
--- servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/tools/wsdl/SchemaCollection.java (original)
+++ servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/tools/wsdl/SchemaCollection.java Sun Feb 6 21:04:44 2011
@@ -55,7 +55,7 @@ public class SchemaCollection {
}
public SchemaCollection(URI baseUri) {
- logger.debug("Initializing schema collection with baseUri: " + baseUri);
+ logger.debug("Initializing schema collection with baseUri: {}", baseUri);
this.baseUri = baseUri;
this.schemas = new HashMap<String, Schema>();
}
@@ -84,7 +84,7 @@ public class SchemaCollection {
}
public void read(String location, URI baseUri) throws Exception {
- logger.debug("Reading schema at '" + location + "' with baseUri '" + baseUri + "'");
+ logger.debug("Reading schema at '{}' with baseUri '{}'", location, baseUri);
if (baseUri == null) {
baseUri = this.baseUri;
}
@@ -148,10 +148,10 @@ public class SchemaCollection {
Node parentNode = ce.getParentNode();
Element root = schema.getRoot();
if (root == parentNode) {
- logger.debug("Removing child include node: " + ce);
+ logger.debug("Removing child include node: {}", ce);
schema.getRoot().removeChild(ce);
} else {
- logger.warn("Skipping child include node removal: " + ce);
+ logger.warn("Skipping child include node removal: {}", ce);
}
if (location != null && !"".equals(location)) {
read(location, baseUri);
Modified: servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/AbstractXBeanDeployer.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/AbstractXBeanDeployer.java?rev=1067761&r1=1067760&r2=1067761&view=diff
==============================================================================
--- servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/AbstractXBeanDeployer.java (original)
+++ servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/AbstractXBeanDeployer.java Sun Feb 6 21:04:44 2011
@@ -53,7 +53,7 @@ public class AbstractXBeanDeployer exten
*/
public boolean canDeploy(String serviceUnitName, String serviceUnitRootPath) {
File xbean = new File(serviceUnitRootPath, getXBeanFile() + ".xml");
- logger.debug("Looking for " + xbean + ": " + xbean.exists());
+ logger.debug("Looking for {}: {}", xbean, xbean.exists());
return xbean.exists();
}
Modified: servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/ClassLoaderXmlPreprocessor.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/ClassLoaderXmlPreprocessor.java?rev=1067761&r1=1067760&r2=1067761&view=diff
==============================================================================
--- servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/ClassLoaderXmlPreprocessor.java (original)
+++ servicemix/components/trunk/shared-libraries/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/ClassLoaderXmlPreprocessor.java Sun Feb 6 21:04:44 2011
@@ -215,7 +215,7 @@ public class ClassLoaderXmlPreprocessor
* @return the jar location URLs.
*/
protected List<URL> getJarResources(String location) {
- logger.debug("Get jar resources from " + location);
+ logger.debug("Get jar resources from {}", location);
List<URL> urls = new LinkedList<URL>();
// get the !/ separator index
int separatorIndex = location.indexOf("!/");
@@ -270,7 +270,7 @@ public class ClassLoaderXmlPreprocessor
* @return
*/
protected List<URL> getFileResources(String location) {
- logger.debug("Get file resources from " + location);
+ logger.debug("Get file resources from {}", location);
List<URL> urls = new LinkedList<URL>();
int starIndex = location.indexOf("*");
if (starIndex == -1) {
Modified: servicemix/components/trunk/shared-libraries/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/shared-libraries/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapEndpoint.java?rev=1067761&r1=1067760&r2=1067761&view=diff
==============================================================================
--- servicemix/components/trunk/shared-libraries/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapEndpoint.java (original)
+++ servicemix/components/trunk/shared-libraries/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapEndpoint.java Sun Feb 6 21:04:44 2011
@@ -236,7 +236,7 @@ public abstract class SoapEndpoint exten
if (uri != null) {
try {
URL url = new URL(uri);
- logger.debug("Setting wsdlResource: " + url.toExternalForm());
+ logger.debug("Setting wsdlResource: {}", url.toExternalForm());
this.setWsdlResource(new UrlResource(url));
} catch (MalformedURLException e) {
logger.warn("Could not parse URL", e);
@@ -301,15 +301,13 @@ public abstract class SoapEndpoint exten
* informations to it.
*/
protected void retrieveProxiedEndpointDefinition() {
- if (logger.isDebugEnabled()) {
- logger.debug("Retrieving proxied endpoint definition");
- }
+ logger.debug("Retrieving proxied endpoint definition");
try {
ComponentContext ctx = this.serviceUnit.getComponent().getComponentContext();
ServiceEndpoint ep = null;
if (targetService != null && targetEndpoint != null) {
ep = ctx.getEndpoint(targetService, targetEndpoint);
- if (ep == null && logger.isDebugEnabled()) {
+ if (ep == null) {
logger.debug("Could not retrieve endpoint targetService/targetEndpoint");
}
}
@@ -318,7 +316,7 @@ public abstract class SoapEndpoint exten
if (eps != null && eps.length > 0) {
ep = eps[0];
}
- if (ep == null && logger.isDebugEnabled()) {
+ if (ep == null) {
logger.debug("Could not retrieve endpoint for targetService");
}
}
@@ -327,13 +325,13 @@ public abstract class SoapEndpoint exten
if (eps != null && eps.length > 0) {
ep = eps[0];
}
- if (ep == null && logger.isDebugEnabled()) {
+ if (ep == null) {
logger.debug("Could not retrieve endpoint for targetInterfaceName");
}
}
if (ep == null && service != null && endpoint != null) {
ep = ctx.getEndpoint(service, endpoint);
- if (ep == null && logger.isDebugEnabled()) {
+ if (ep == null) {
logger.debug("Could not retrieve endpoint for service/endpoint");
}
}
Modified: servicemix/components/trunk/shared-libraries/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapHelper.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/shared-libraries/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapHelper.java?rev=1067761&r1=1067760&r2=1067761&view=diff
==============================================================================
--- servicemix/components/trunk/shared-libraries/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapHelper.java (original)
+++ servicemix/components/trunk/shared-libraries/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapHelper.java Sun Feb 6 21:04:44 2011
@@ -369,7 +369,7 @@ public class SoapHelper {
definition = reader.readWSDL(null, description);
definitions.put(key, definition);
} catch (WSDLException e) {
- logger.info("Could not read wsdl from endpoint descriptor: " + e.getMessage());
+ logger.info("Could not read wsdl from endpoint descriptor: {}", e.getMessage());
logger.debug("Could not read wsdl from endpoint descriptor", e);
}
}
Modified: servicemix/components/trunk/shared-libraries/servicemix-soap/src/test/java/org/apache/servicemix/soap/handlers/security/WSSecurityHandlerTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/shared-libraries/servicemix-soap/src/test/java/org/apache/servicemix/soap/handlers/security/WSSecurityHandlerTest.java?rev=1067761&r1=1067760&r2=1067761&view=diff
==============================================================================
--- servicemix/components/trunk/shared-libraries/servicemix-soap/src/test/java/org/apache/servicemix/soap/handlers/security/WSSecurityHandlerTest.java (original)
+++ servicemix/components/trunk/shared-libraries/servicemix-soap/src/test/java/org/apache/servicemix/soap/handlers/security/WSSecurityHandlerTest.java Sun Feb 6 21:04:44 2011
@@ -57,7 +57,7 @@ public class WSSecurityHandlerTest exten
System.setProperty("java.security.auth.login.config", path);
}
}
- logger.info("Path to login config: " + path);
+ logger.info("Path to login config: {}", path);
}
public void testUserNameToken() throws Exception {
Modified: servicemix/components/trunk/shared-libraries/servicemix-soap/src/test/java/org/apache/servicemix/soap/marshalers/FaultTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/shared-libraries/servicemix-soap/src/test/java/org/apache/servicemix/soap/marshalers/FaultTest.java?rev=1067761&r1=1067760&r2=1067761&view=diff
==============================================================================
--- servicemix/components/trunk/shared-libraries/servicemix-soap/src/test/java/org/apache/servicemix/soap/marshalers/FaultTest.java (original)
+++ servicemix/components/trunk/shared-libraries/servicemix-soap/src/test/java/org/apache/servicemix/soap/marshalers/FaultTest.java Sun Feb 6 21:04:44 2011
@@ -83,7 +83,7 @@ public class FaultTest extends TestCase
ByteArrayOutputStream baos = new ByteArrayOutputStream();
writer.write(baos);
- logger.info("Resulting Fault: \n" + baos);
+ logger.info("Resulting Fault: \n{}", baos);
}
public void testReadSoap11UsingDom() throws Exception {
Modified: servicemix/components/trunk/shared-libraries/servicemix-soap2/src/main/java/org/apache/servicemix/soap/core/PhaseInterceptorChain.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/shared-libraries/servicemix-soap2/src/main/java/org/apache/servicemix/soap/core/PhaseInterceptorChain.java?rev=1067761&r1=1067760&r2=1067761&view=diff
==============================================================================
--- servicemix/components/trunk/shared-libraries/servicemix-soap2/src/main/java/org/apache/servicemix/soap/core/PhaseInterceptorChain.java (original)
+++ servicemix/components/trunk/shared-libraries/servicemix-soap2/src/main/java/org/apache/servicemix/soap/core/PhaseInterceptorChain.java Sun Feb 6 21:04:44 2011
@@ -56,7 +56,7 @@ public class PhaseInterceptorChain imple
}
public void add(Interceptor i) {
- logger.debug("Adding interceptor " + i.getId());
+ logger.debug("Adding interceptor {}", i.getId());
insertInterceptor(i);
}
@@ -77,22 +77,16 @@ public class PhaseInterceptorChain imple
try {
while (iterator.hasNext()) {
Interceptor currentInterceptor = iterator.next();
- if (logger.isDebugEnabled()) {
- logger.debug("Invoking handleMessage on interceptor " + currentInterceptor.getId());
- }
+ logger.debug("Invoking handleMessage on interceptor {}", currentInterceptor.getId());
currentInterceptor.handleMessage(message);
}
} catch (RuntimeException ex) {
- if (logger.isInfoEnabled()) {
- logger.info("Interceptor has thrown exception, unwinding now", ex);
- }
+ logger.info("Interceptor has thrown exception, unwinding now", ex);
message.setContent(Exception.class, ex);
// Unwind
while (iterator.hasPrevious()) {
Interceptor currentInterceptor = iterator.previous();
- if (logger.isDebugEnabled()) {
- logger.debug("Invoking handleFault on interceptor " + currentInterceptor.getId());
- }
+ logger.debug("Invoking handleFault on interceptor {}", currentInterceptor.getId());
currentInterceptor.handleFault(message);
}
throw ex;