Polish
This commit is contained in:
@@ -29,6 +29,7 @@ import java.util.regex.Pattern;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.core.log.LogMessage;
|
||||
import org.springframework.util.Base64Utils;
|
||||
|
||||
/**
|
||||
@@ -68,9 +69,7 @@ class Connection {
|
||||
this.inputStream = new ConnectionInputStream(inputStream);
|
||||
this.outputStream = new ConnectionOutputStream(outputStream);
|
||||
this.header = this.inputStream.readHeader();
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Established livereload connection [" + this.header + "]");
|
||||
}
|
||||
logger.debug(LogMessage.format("Established livereload connection [%s]", this.header));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -109,9 +108,7 @@ class Connection {
|
||||
throw new ConnectionClosedException();
|
||||
}
|
||||
else if (frame.getType() == Frame.Type.TEXT) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Received LiveReload text frame " + frame);
|
||||
}
|
||||
logger.debug(LogMessage.format("Received LiveReload text frame %s", frame));
|
||||
}
|
||||
else {
|
||||
throw new IOException("Unexpected Frame Type " + frame.getType());
|
||||
|
||||
@@ -33,6 +33,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.core.log.LogMessage;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
@@ -109,9 +110,7 @@ public class LiveReloadServer {
|
||||
public int start() throws IOException {
|
||||
synchronized (this.monitor) {
|
||||
Assert.state(!isStarted(), "Server already started");
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Starting live reload server on port " + this.port);
|
||||
}
|
||||
logger.debug(LogMessage.format("Starting live reload server on port %s", this.port));
|
||||
this.serverSocket = new ServerSocket(this.port);
|
||||
int localPort = this.serverSocket.getLocalPort();
|
||||
this.listenThread = this.threadFactory.newThread(this::acceptConnections);
|
||||
|
||||
Reference in New Issue
Block a user