@ -62,10 +63,8 @@ public class DiskSpaceHealthIndicator extends AbstractHealthIndicator {
@@ -62,10 +63,8 @@ public class DiskSpaceHealthIndicator extends AbstractHealthIndicator {
builder.up();
}
else{
if(logger.isWarnEnabled()){
logger.warn(String.format("Free disk space below threshold. Available: %d bytes (threshold: %s)",
diskFreeInBytes,this.threshold));
}
logger.warn(LogMessage.format("Free disk space below threshold. Available: %d bytes (threshold: %s)",
@ -287,9 +288,9 @@ public abstract class AbstractErrorWebExceptionHandler implements ErrorWebExcept
@@ -287,9 +288,9 @@ public abstract class AbstractErrorWebExceptionHandler implements ErrorWebExcept
@ -54,9 +55,7 @@ public class OptionalLiveReloadServer implements InitializingBean {
@@ -54,9 +55,7 @@ public class OptionalLiveReloadServer implements InitializingBean {
if(!this.server.isStarted()){
this.server.start();
}
if(logger.isInfoEnabled()){
logger.info("LiveReload server is running on port "+this.server.getPort());
}
logger.info(LogMessage.format("LiveReload server is running on port %s",this.server.getPort()));
@ -58,12 +59,8 @@ public class ClassPathFolders implements Iterable<File> {
@@ -58,12 +59,8 @@ public class ClassPathFolders implements Iterable<File> {
this.folders.add(ResourceUtils.getFile(url));
}
catch(Exceptionex){
if(logger.isWarnEnabled()){
logger.warn("Unable to get classpath URL "+url);
}
if(logger.isTraceEnabled()){
logger.trace("Unable to get classpath URL "+url,ex);
}
logger.warn(LogMessage.format("Unable to get classpath URL %s",url));
logger.trace(LogMessage.format("Unable to get classpath URL ",url),ex);
@ -80,14 +81,14 @@ public class DevToolsPropertyDefaultsPostProcessor implements EnvironmentPostPro
@@ -80,14 +81,14 @@ public class DevToolsPropertyDefaultsPostProcessor implements EnvironmentPostPro
@ -114,10 +115,8 @@ public class ClassPathChangeUploader implements ApplicationListener<ClassPathCha
@@ -114,10 +115,8 @@ public class ClassPathChangeUploader implements ApplicationListener<ClassPathCha
return;
}
catch(SocketExceptionex){
if(logger.isWarnEnabled()){
logger.warn("A failure occurred when uploading to "+this.uri
+". Upload will be retried in 2 seconds");
}
logger.warn(LogMessage.format(
"A failure occurred when uploading to %s. Upload will be retried in 2 seconds",this.uri));
logger.debug("Upload failure",ex);
Thread.sleep(2000);
}
@ -130,10 +129,8 @@ public class ClassPathChangeUploader implements ApplicationListener<ClassPathCha
@@ -130,10 +129,8 @@ public class ClassPathChangeUploader implements ApplicationListener<ClassPathCha
@ -118,9 +119,10 @@ public class RemoteClientConfiguration implements InitializingBean {
@@ -118,9 +119,10 @@ public class RemoteClientConfiguration implements InitializingBean {
@ -73,9 +74,8 @@ public class RestartApplicationListener implements ApplicationListener<Applicati
@@ -73,9 +74,8 @@ public class RestartApplicationListener implements ApplicationListener<Applicati
@ -92,9 +93,7 @@ public class HttpTunnelConnection implements TunnelConnection {
@@ -92,9 +93,7 @@ public class HttpTunnelConnection implements TunnelConnection {
@ -154,10 +153,8 @@ public class HttpTunnelConnection implements TunnelConnection {
@@ -154,10 +153,8 @@ public class HttpTunnelConnection implements TunnelConnection {
}
catch(IOExceptionex){
if(exinstanceofConnectException){
if(logger.isWarnEnabled()){
logger.warn(
"Failed to connect to remote application at "+HttpTunnelConnection.this.uri);
}
logger.warn(LogMessage.format("Failed to connect to remote application at %s",
@ -88,9 +89,7 @@ public class TunnelClient implements SmartInitializingSingleton {
@@ -88,9 +89,7 @@ public class TunnelClient implements SmartInitializingSingleton {
@ -146,9 +145,8 @@ public class TunnelClient implements SmartInitializingSingleton {
@@ -146,9 +145,8 @@ public class TunnelClient implements SmartInitializingSingleton {
}
publicvoidclose()throwsIOException{
if(logger.isTraceEnabled()){
logger.trace("Closing tunnel client on port "+this.serverSocketChannel.socket().getLocalPort());
}
logger.trace(LogMessage.format("Closing tunnel client on port %s",
@ -54,9 +55,7 @@ public class SocketTargetServerConnection implements TargetServerConnection {
@@ -54,9 +55,7 @@ public class SocketTargetServerConnection implements TargetServerConnection {
@ -416,9 +417,7 @@ public class LoggingApplicationListener implements GenericApplicationListener {
@@ -416,9 +417,7 @@ public class LoggingApplicationListener implements GenericApplicationListener {
system.setLogLevel(name,level);
}
catch(RuntimeExceptionex){
if(this.logger.isErrorEnabled()){
this.logger.error("Cannot set level '"+level+"' for '"+name+"'");
}
this.logger.error(LogMessage.format("Cannot set level '%s' for '%s'",level,name));
@ -77,9 +77,7 @@ final class FailureAnalyzers implements SpringBootExceptionReporter {
@@ -77,9 +77,7 @@ final class FailureAnalyzers implements SpringBootExceptionReporter {
@ -91,9 +92,7 @@ public class WebServerPortFileWriter implements ApplicationListener<WebServerIni
@@ -91,9 +92,7 @@ public class WebServerPortFileWriter implements ApplicationListener<WebServerIni
portFile.deleteOnExit();
}
catch(Exceptionex){
if(logger.isWarnEnabled()){
logger.warn(String.format("Cannot create port file %s",this.file));
}
logger.warn(LogMessage.format("Cannot create port file %s",this.file));