Do not use String.format and construct the string only if logger FINEST is enabled.
This commit is contained in:
parent
94b3cb2661
commit
350fb833ac
@ -209,8 +209,10 @@ class Connector
|
|||||||
if(!running)
|
if(!running)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
logger.finest(String.format("received datagram packet - addr: %s port: %d",
|
if (logger.isLoggable(Level.FINEST)){
|
||||||
packet.getAddress(), packet.getPort()));
|
logger.finest("received datagram packet - addr: "
|
||||||
|
+ packet.getAddress() + " port: " + packet.getPort());
|
||||||
|
}
|
||||||
if (packet.getPort() < 0)
|
if (packet.getPort() < 0)
|
||||||
{
|
{
|
||||||
logger.warning("Out of range packet port, resetting to 0");
|
logger.warning("Out of range packet port, resetting to 0");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user