Merge pull request #615 from okybaca/logging2

Logging unclutter
pull/619/head
Michael Christen 12 months ago committed by GitHub
commit d097a642c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

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

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

@ -281,7 +281,7 @@ public class Dispatcher implements WorkflowTask<Transmission.Chunk> {
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);

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

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

Loading…
Cancel
Save