Skip to content

Commit

Permalink
Issue #4996 Fix LOG.warns
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Bartel <janb@webtide.com>
  • Loading branch information
janbartel committed Aug 18, 2020
1 parent a4f5ec4 commit 5363cad
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public void bind(InetSocketAddress addr, int backlog) throws IOException
if (connector.getPort() == addr.getPort() || connector.getLocalPort() == addr.getPort())
{
if (LOG.isDebugEnabled())
LOG.debug("server already bound to port " + addr.getPort() + ", no need to rebind");
LOG.debug("server already bound to port {}, no need to rebind", addr.getPort());
return;
}
}
Expand All @@ -99,7 +99,7 @@ public void bind(InetSocketAddress addr, int backlog) throws IOException
throw new IOException("jetty server is not bound to port " + addr.getPort());

if (LOG.isDebugEnabled())
LOG.debug("binding server to port " + addr.getPort());
LOG.debug("binding server to port {}", addr.getPort());
ServerConnector connector = new ServerConnector(_server);
connector.setPort(addr.getPort());
connector.setHost(addr.getHostName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ else if (aeof)
if (LOG.isDebugEnabled())
LOG.warn(msg, e2);
else
LOG.warn(msg + ": {}", e2.toString());
LOG.warn("{}: {}", msg, e2.toString());
throw new RuntimeIOException(msg, e2);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ public void setStylesheet(String stylesheet)
_stylesheet = Resource.newResource(stylesheet);
if (!_stylesheet.exists())
{
LOG.warn("unable to find custom stylesheet: " + stylesheet);
LOG.warn("unable to find custom stylesheet: {}", stylesheet);
_stylesheet = null;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ protected void doStop() throws Exception
}
catch (Throwable t)
{
LOG.warn("Unable to close job: " + job, t);
LOG.warn("Unable to close job: {}", job, t);
}
}
else if (job != NOOP)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ private void notifyUpgradeListeners(Consumer<UpgradeListener> action)
}
catch (Throwable t)
{
LOG.info("Exception while invoking listener " + listener, t);
LOG.info("Exception while invoking listener {}", listener, t);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private void saveFrame(Frame frame, boolean outgoing)
}
catch (IOException e)
{
LOG.warn("Unable to save frame: " + frame, e);
LOG.warn("Unable to save frame: {}", frame, e);
}
finally
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ protected void notifyCallbackSuccess(Callback callback)
catch (Throwable x)
{
if (LOG.isDebugEnabled())
LOG.debug("Exception while notifying success of callback " + callback, x);
LOG.debug("Exception while notifying success of callback {}", callback, x);
}
}

Expand All @@ -476,7 +476,7 @@ protected void notifyCallbackFailure(Callback callback, Throwable failure)
catch (Throwable x)
{
if (LOG.isDebugEnabled())
LOG.debug("Exception while notifying failure of callback " + callback, x);
LOG.debug("Exception while notifying failure of callback {}", callback, x);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ public void sendFrame(Frame frame, Callback callback, boolean batch)
catch (Throwable t)
{
if (LOG.isDebugEnabled())
LOG.warn("Invalid outgoing frame: " + frame, t);
LOG.warn("Invalid outgoing frame: {}", frame, t);

callback.failed(t);
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public void onTextMessage(String message)
catch (IOException e)
{
writeMessage("Unable to read resource: " + name);
LOG.warn("Unable to read resource: " + name, e);
LOG.warn("Unable to read resource: {}", name, e);
}
return;
}
Expand Down

0 comments on commit 5363cad

Please sign in to comment.