Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9ed24f2

Browse files
committed
Reduce debug logging verbosity
1 parent060b564 commit9ed24f2

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

‎client/src/main/java/org/asynchttpclient/netty/channel/DefaultChannelPool.java‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,11 @@ private List<IdleChannel> expiredChannels(ConcurrentLinkedDeque<IdleChannel> par
154154
// lazy create
155155
List<IdleChannel>idleTimeoutChannels =null;
156156
for (IdleChannelidleChannel :partition) {
157-
if (isIdleTimeoutExpired(idleChannel,now) ||isRemotelyClosed(idleChannel.channel) ||isTtlExpired(idleChannel.channel,now)) {
158-
LOGGER.debug("Adding Candidate expired Channel {}",idleChannel.channel);
157+
booleanisIdleTimeoutExpired =isIdleTimeoutExpired(idleChannel,now);
158+
booleanisRemotelyClosed =isRemotelyClosed(idleChannel.channel);
159+
booleanisTtlExpired =isTtlExpired(idleChannel.channel,now);
160+
if (isIdleTimeoutExpired ||isRemotelyClosed ||isTtlExpired) {
161+
LOGGER.debug("Adding Candidate expired Channel {} isIdleTimeoutExpired={} isRemotelyClosed={} isTtlExpired={}",idleChannel.channel,isIdleTimeoutExpired,isRemotelyClosed,isTtlExpired);
159162
if (idleTimeoutChannels ==null)
160163
idleTimeoutChannels =newArrayList<>(1);
161164
idleTimeoutChannels.add(idleChannel);
@@ -199,7 +202,10 @@ public void run(Timeout timeout) throws Exception {
199202

200203
if (LOGGER.isDebugEnabled())
201204
for (Objectkey :partitions.keySet()) {
202-
LOGGER.debug("Entry count for : {} : {}",key,partitions.get(key).size());
205+
intsize =partitions.get(key).size();
206+
if (size >0) {
207+
LOGGER.debug("Entry count for : {} : {}",key,size);
208+
}
203209
}
204210

205211
longstart =unpreciseMillisTime();
@@ -228,7 +234,9 @@ public void run(Timeout timeout) throws Exception {
228234

229235
if (LOGGER.isDebugEnabled()) {
230236
longduration =unpreciseMillisTime() -start;
231-
LOGGER.debug("Closed {} connections out of {} in {} ms",closedCount,totalCount,duration);
237+
if (closedCount >0) {
238+
LOGGER.debug("Closed {} connections out of {} in {} ms",closedCount,totalCount,duration);
239+
}
232240
}
233241

234242
scheduleNewIdleChannelDetector(timeout.task());

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp