diff --git a/common/src/main/java/io/netty/util/NetUtil.java b/common/src/main/java/io/netty/util/NetUtil.java index 2afe52e9f3..0dcba4e28b 100644 --- a/common/src/main/java/io/netty/util/NetUtil.java +++ b/common/src/main/java/io/netty/util/NetUtil.java @@ -187,9 +187,11 @@ public final class NetUtil { try { in = new BufferedReader(new FileReader(file)); somaxconn = Integer.parseInt(in.readLine()); - logger.debug("/proc/sys/net/core/somaxconn: {}", somaxconn); + if (logger.isDebugEnabled()) { + logger.debug("{}: {}", file, somaxconn); + } } catch (Exception e) { - logger.debug("Failed to get SOMAXCONN", e); + logger.debug("Failed to get SOMAXCONN from: {}", file, e); } finally { if (in != null) { try { @@ -200,7 +202,9 @@ public final class NetUtil { } } } else { - logger.debug("/proc/sys/net/core/somaxconn not exists. Use default-value: {}", somaxconn); + if (logger.isDebugEnabled()) { + logger.debug("{}: {} (non-existent)", file, somaxconn); + } } SOMAXCONN = somaxconn;