From 1c5fca9a583dafdd24df61dcfbfc282d57a62115 Mon Sep 17 00:00:00 2001 From: okybaca Date: Sun, 26 Nov 2023 12:24:09 +0100 Subject: [PATCH 1/3] changed network operation log category from YACY to NETWORK --- defaults/yacy.logging | 3 +++ source/net/yacy/peers/Network.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/defaults/yacy.logging b/defaults/yacy.logging index c0a0f5d2c..c512fd20c 100644 --- a/defaults/yacy.logging +++ b/defaults/yacy.logging @@ -10,10 +10,13 @@ # INFO regular action information (i.e. any httpd request URL) # CONFIG regular system status information (i.e. start-up messages) # FINE in-function status debug output +# FINER more details in debug output +# FINEST even more details in debug output BASE64.level = OFF PARSER.level = INFO PROXY.level = INFO YACY.level = INFO +NETWORK.level = INFO HTCACHE.level = INFO PLASMA.level = INFO SERVER.level = INFO diff --git a/source/net/yacy/peers/Network.java b/source/net/yacy/peers/Network.java index 181bb9c30..d29fed7c9 100644 --- a/source/net/yacy/peers/Network.java +++ b/source/net/yacy/peers/Network.java @@ -71,7 +71,7 @@ public class Network // statics public static final ThreadGroup publishThreadGroup = new ThreadGroup("publishThreadGroup"); public static final HashMap seedUploadMethods = new HashMap<>(); - public static final ConcurrentLog log = new ConcurrentLog("YACY"); + public static final ConcurrentLog log = new ConcurrentLog("NETWORK"); /** pseudo-random key derived from a time-interval while YaCy startup */ public static long speedKey = 0; public static long magic = System.currentTimeMillis(); From 553c859703afbcb120b5227456379c11697c3447 Mon Sep 17 00:00:00 2001 From: okybaca Date: Mon, 27 Nov 2023 07:51:42 +0100 Subject: [PATCH 2/3] logging: moved some log-cluttering DHT messages to level 'fine' --- source/net/yacy/peers/DHTSelection.java | 2 +- source/net/yacy/peers/Dispatcher.java | 2 +- source/net/yacy/search/Switchboard.java | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/net/yacy/peers/DHTSelection.java b/source/net/yacy/peers/DHTSelection.java index 63f408181..6030226ae 100644 --- a/source/net/yacy/peers/DHTSelection.java +++ b/source/net/yacy/peers/DHTSelection.java @@ -215,7 +215,7 @@ public class DHTSelection { /* Even if the peer is not a robinson and has the required minimum age, it may have an empty or disabled RWI */ continue; } - if (RemoteSearch.log.isInfo()) RemoteSearch.log.info("selectPeers/DHTorder: " + seed.hash + ":" + seed.getName() + "/ score " + c); + if (RemoteSearch.log.isFine()) RemoteSearch.log.fine("selectPeers/DHTorder: " + seed.hash + ":" + seed.getName() + "/ score " + c); seeds.add(seed); c--; } diff --git a/source/net/yacy/peers/Dispatcher.java b/source/net/yacy/peers/Dispatcher.java index d3af84dbf..0c9ee0507 100644 --- a/source/net/yacy/peers/Dispatcher.java +++ b/source/net/yacy/peers/Dispatcher.java @@ -281,7 +281,7 @@ public class Dispatcher implements WorkflowTask { for (Seed target: targets[vertical]) { Transmission.Chunk entry = this.transmissionBuffer.get(target.hash); // if this is not null, the entry is extended here if (entry == null) entry = transmission.newChunk(target); else { - log.info("extending chunk for peer " + entry.dhtTarget().hash + " containing " + entry.containersSize() + " references with " + verticalContainer.size() + " more entries"); + log.fine("extending chunk for peer " + entry.dhtTarget().hash + " containing " + entry.containersSize() + " references with " + verticalContainer.size() + " more entries"); } try { entry.add(verticalContainer); diff --git a/source/net/yacy/search/Switchboard.java b/source/net/yacy/search/Switchboard.java index bfadb1892..0d5e03c00 100644 --- a/source/net/yacy/search/Switchboard.java +++ b/source/net/yacy/search/Switchboard.java @@ -4110,7 +4110,7 @@ public final class Switchboard extends serverSwitch { final long kbytesUp = ConnectionInfo.getActiveUpbytes() / 1024; // accumulate RWIs to transmission buffer if ( this.dhtDispatcher.bufferSize() > this.peers.scheme.verticalPartitions() ) { - this.log.info("dhtTransferJob: no selection, too many entries in transmission buffer: " + this.log.fine("dhtTransferJob: no selection, too many entries in transmission buffer: " + this.dhtDispatcher.bufferSize()); } else if ( MemoryControl.available() < 1024 * 1024 * 25 ) { this.log.info("dhtTransferJob: no selection, too less memory available : " @@ -4148,7 +4148,7 @@ public final class Switchboard extends serverSwitch { this.dhtMaxReferenceCount, 5000); hasDoneSomething = hasDoneSomething | enqueued; - this.log.info("dhtTransferJob: result from enqueueing: " + ((enqueued) ? "true" : "false")); + this.log.fine("dhtTransferJob: result from enqueueing: " + ((enqueued) ? "true" : "false")); } // check if we can deliver entries to other peers @@ -4166,7 +4166,7 @@ public final class Switchboard extends serverSwitch { } else { final boolean dequeued = this.dhtDispatcher.dequeueContainer(); hasDoneSomething = hasDoneSomething | dequeued; - this.log.info("dhtTransferJob: result from dequeueing: " + ((dequeued) ? "true" : "false")); + this.log.fine("dhtTransferJob: result from dequeueing: " + ((dequeued) ? "true" : "false")); } return hasDoneSomething; } From 7831f294a962f23640035731ac61c125e0390f02 Mon Sep 17 00:00:00 2001 From: okybaca Date: Mon, 27 Nov 2023 08:12:03 +0100 Subject: [PATCH 3/3] changed regular peerping messages to level fine --- source/net/yacy/htroot/yacy/hello.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/net/yacy/htroot/yacy/hello.java b/source/net/yacy/htroot/yacy/hello.java index ccf62b3e7..26d106682 100644 --- a/source/net/yacy/htroot/yacy/hello.java +++ b/source/net/yacy/htroot/yacy/hello.java @@ -207,7 +207,7 @@ public final class hello { remoteSeed.put(Seed.PEERTYPE, Seed.PEERTYPE_SENIOR); } // connect the seed - Network.log.info("hello/server: responded remote " + reportedPeerType + " peer '" + remoteSeed.getName() + "' from " + reportedips + ", time_dnsResolve=" + time_dnsResolve + ", time_backping=" + time_backping + ", method=" + backping_method + ", urls=" + callback[0]); + Network.log.fine("hello/server: responded remote " + reportedPeerType + " peer '" + remoteSeed.getName() + "' from " + reportedips + ", time_dnsResolve=" + time_dnsResolve + ", time_backping=" + time_backping + ", method=" + backping_method + ", urls=" + callback[0]); sb.peers.peerActions.peerArrival(remoteSeed, true); } else { //ConcurrentLog.info("**hello-DEBUG**", "fail for IP(s) " + remoteSeed.getIPs() + ", port " + remoteSeed.getPort()); @@ -215,7 +215,7 @@ public final class hello { remoteSeed.setIP(ias.getHostAddress()); prop.put(Seed.YOURTYPE, Seed.PEERTYPE_JUNIOR); remoteSeed.put(Seed.PEERTYPE, Seed.PEERTYPE_JUNIOR); - Network.log.info("hello/server: responded remote " + reportedPeerType + " peer '" + remoteSeed.getName() + "' from " + reportedips + ", time_dnsResolve=" + time_dnsResolve + ", time_backping=" + time_backping + ", method=" + backping_method + ", urls=" + callback[0]); + Network.log.fine("hello/server: responded remote " + reportedPeerType + " peer '" + remoteSeed.getName() + "' from " + reportedips + ", time_dnsResolve=" + time_dnsResolve + ", time_backping=" + time_backping + ", method=" + backping_method + ", urls=" + callback[0]); // no connection here, instead store junior in connection cache if ((remoteSeed.hash != null) && (remoteSeed.isProper(false) == null)) { sb.peers.peerActions.peerPing(remoteSeed); @@ -227,7 +227,7 @@ public final class hello { // update event tracker EventTracker.update(EventTracker.EClass.PEERPING, new ProfilingGraph.EventPing(remoteSeed.getName(), sb.peers.myName(), false, connectedAfter - connectedBefore), false); if (!(prop.get(Seed.YOURTYPE)).equals(reportedPeerType)) { - Network.log.info("hello/server: changing remote peer '" + remoteSeed.getName() + "' " + reportedips + " peerType from '" + reportedPeerType + "' to '" + prop.get(Seed.YOURTYPE) + "'."); + Network.log.fine("hello/server: changing remote peer '" + remoteSeed.getName() + "' " + reportedips + " peerType from '" + reportedPeerType + "' to '" + prop.get(Seed.YOURTYPE) + "'."); } final StringBuilder seeds = new StringBuilder(768); @@ -268,7 +268,7 @@ public final class hello { prop.put("seedlist", seeds.toString()); // return rewrite properties prop.put("message", "ok " + seed.length()); - Network.log.info("hello/server: responded remote peer '" + remoteSeed.getName() + "' " + reportedips + " in " + (System.currentTimeMillis() - start) + " milliseconds"); + Network.log.fine("hello/server: responded remote peer '" + remoteSeed.getName() + "' " + reportedips + " in " + (System.currentTimeMillis() - start) + " milliseconds"); return prop; }