Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging unclutter #615

Merged
merged 3 commits into from
Dec 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions defaults/yacy.logging
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions source/net/yacy/htroot/yacy/hello.java
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,15 @@ public static serverObjects respond(final RequestHeader header, final serverObje
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());
prop.put("yourip", ias.getHostAddress());
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);
Expand All @@ -227,7 +227,7 @@ public static serverObjects respond(final RequestHeader header, final serverObje
// 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);
Expand Down Expand Up @@ -268,7 +268,7 @@ public static serverObjects respond(final RequestHeader header, final serverObje
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;
}

Expand Down
2 changes: 1 addition & 1 deletion source/net/yacy/peers/DHTSelection.java
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ private static ArrayList<Seed> selectVerticalDHTPositions(final SeedDB seedDB, f
/* 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--;
}
Expand Down
2 changes: 1 addition & 1 deletion source/net/yacy/peers/Dispatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ private void enqueueContainersToBuffer(final byte[] wordhash, final ReferenceCon
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);
Expand Down
2 changes: 1 addition & 1 deletion source/net/yacy/peers/Network.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public class Network
// statics
public static final ThreadGroup publishThreadGroup = new ThreadGroup("publishThreadGroup");
public static final HashMap<String, String> 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();
Expand Down
6 changes: 3 additions & 3 deletions source/net/yacy/search/Switchboard.java
Original file line number Diff line number Diff line change
Expand Up @@ -4110,7 +4110,7 @@ public boolean dhtTransferJob() {
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 : "
Expand Down Expand Up @@ -4148,7 +4148,7 @@ public boolean dhtTransferJob() {
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
Expand All @@ -4166,7 +4166,7 @@ public boolean dhtTransferJob() {
} 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;
}
Expand Down