Added debug logging with effective value for io.netty.leakDetection.acquireAndReleaseOnly property
Motivation: The configurable property value recently added was not logged like others properties. Modifications: Added debug log with effective value applied. Result: Consistent with other properties
This commit is contained in:
parent
0476a5f06a
commit
dde894310d
@ -19,6 +19,8 @@ package io.netty.buffer;
|
||||
import io.netty.util.ByteProcessor;
|
||||
import io.netty.util.ResourceLeak;
|
||||
import io.netty.util.internal.SystemPropertyUtil;
|
||||
import io.netty.util.internal.logging.InternalLogger;
|
||||
import io.netty.util.internal.logging.InternalLoggerFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@ -34,8 +36,14 @@ final class AdvancedLeakAwareByteBuf extends WrappedByteBuf {
|
||||
private static final String PROP_ACQUIRE_AND_RELEASE_ONLY = "io.netty.leakDetection.acquireAndReleaseOnly";
|
||||
private static final boolean ACQUIRE_AND_RELEASE_ONLY;
|
||||
|
||||
private static final InternalLogger logger = InternalLoggerFactory.getInstance(AdvancedLeakAwareByteBuf.class);
|
||||
|
||||
static {
|
||||
ACQUIRE_AND_RELEASE_ONLY = SystemPropertyUtil.getBoolean(PROP_ACQUIRE_AND_RELEASE_ONLY, false);
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("-D{}: {}", PROP_ACQUIRE_AND_RELEASE_ONLY, ACQUIRE_AND_RELEASE_ONLY);
|
||||
}
|
||||
}
|
||||
|
||||
private final ResourceLeak leak;
|
||||
|
Loading…
Reference in New Issue
Block a user