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:
Matteo Merli 2015-08-31 15:06:35 -07:00 committed by Norman Maurer
parent 141d4d0101
commit 7a9a3159f9
1 changed files with 8 additions and 0 deletions

View File

@ -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;