* Logging: Move common WARN output to DEBUG so we can ask users to
set the default log level to WARN without massive spewage
This commit is contained in:
@ -93,8 +93,8 @@ public class ElGamalAESEngine {
|
|||||||
decrypted = decryptExistingSession(data, key, targetPrivateKey, foundTags, usedKey, foundKey);
|
decrypted = decryptExistingSession(data, key, targetPrivateKey, foundTags, usedKey, foundKey);
|
||||||
if (decrypted != null) {
|
if (decrypted != null) {
|
||||||
_context.statManager().updateFrequency("crypto.elGamalAES.decryptExistingSession");
|
_context.statManager().updateFrequency("crypto.elGamalAES.decryptExistingSession");
|
||||||
if ( (foundTags.size() > 0) && (_log.shouldLog(Log.WARN)) )
|
if ( (foundTags.size() > 0) && (_log.shouldLog(Log.DEBUG)) )
|
||||||
_log.warn(id + ": ElG/AES decrypt success with " + st + ": found tags: " + foundTags);
|
_log.debug(id + ": ElG/AES decrypt success with " + st + ": found tags: " + foundTags);
|
||||||
wasExisting = true;
|
wasExisting = true;
|
||||||
} else {
|
} else {
|
||||||
_context.statManager().updateFrequency("crypto.elGamalAES.decryptFailed");
|
_context.statManager().updateFrequency("crypto.elGamalAES.decryptFailed");
|
||||||
@ -107,8 +107,8 @@ public class ElGamalAESEngine {
|
|||||||
decrypted = decryptNewSession(data, targetPrivateKey, foundTags, usedKey, foundKey);
|
decrypted = decryptNewSession(data, targetPrivateKey, foundTags, usedKey, foundKey);
|
||||||
if (decrypted != null) {
|
if (decrypted != null) {
|
||||||
_context.statManager().updateFrequency("crypto.elGamalAES.decryptNewSession");
|
_context.statManager().updateFrequency("crypto.elGamalAES.decryptNewSession");
|
||||||
if ( (foundTags.size() > 0) && (_log.shouldLog(Log.WARN)) )
|
if ( (foundTags.size() > 0) && (_log.shouldLog(Log.DEBUG)) )
|
||||||
_log.warn("ElG decrypt success: found tags: " + foundTags);
|
_log.debug("ElG decrypt success: found tags: " + foundTags);
|
||||||
} else {
|
} else {
|
||||||
_context.statManager().updateFrequency("crypto.elGamalAES.decryptFailed");
|
_context.statManager().updateFrequency("crypto.elGamalAES.decryptFailed");
|
||||||
if (_log.shouldLog(Log.WARN))
|
if (_log.shouldLog(Log.WARN))
|
||||||
|
@ -189,8 +189,8 @@ public class Rate {
|
|||||||
long measuredPeriod = now - _lastCoalesceDate;
|
long measuredPeriod = now - _lastCoalesceDate;
|
||||||
if (measuredPeriod < _period - SLACK) {
|
if (measuredPeriod < _period - SLACK) {
|
||||||
// no need to coalesce (assuming we only try to do so once per minute)
|
// no need to coalesce (assuming we only try to do so once per minute)
|
||||||
if (_log.shouldLog(Log.WARN))
|
if (_log.shouldLog(Log.DEBUG))
|
||||||
_log.warn("not coalescing, measuredPeriod = " + measuredPeriod + " period = " + _period);
|
_log.debug("not coalescing, measuredPeriod = " + measuredPeriod + " period = " + _period);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,13 +123,13 @@ public class GarlicMessageBuilder {
|
|||||||
|
|
||||||
long timeFromNow = config.getExpiration() - ctx.clock().now();
|
long timeFromNow = config.getExpiration() - ctx.clock().now();
|
||||||
if (timeFromNow < 1*1000) {
|
if (timeFromNow < 1*1000) {
|
||||||
if (log.shouldLog(Log.WARN))
|
if (log.shouldLog(Log.DEBUG))
|
||||||
log.warn("Building a message expiring in " + timeFromNow + "ms: " + config, new Exception("created by"));
|
log.debug("Building a message expiring in " + timeFromNow + "ms: " + config, new Exception("created by"));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (log.shouldLog(Log.WARN))
|
if (log.shouldLog(Log.DEBUG))
|
||||||
log.warn("CloveSet size for message " + msg.getUniqueId() + " is " + cloveSet.length
|
log.debug("CloveSet size for message " + msg.getUniqueId() + " is " + cloveSet.length
|
||||||
+ " and encrypted message data is " + encData.length);
|
+ " and encrypted message data is " + encData.length);
|
||||||
|
|
||||||
return msg;
|
return msg;
|
||||||
|
@ -225,8 +225,8 @@ class PeerManager {
|
|||||||
if (caps.indexOf(capability) >= 0)
|
if (caps.indexOf(capability) >= 0)
|
||||||
rv.add(ri.getIdentity().calculateHash());
|
rv.add(ri.getIdentity().calculateHash());
|
||||||
}
|
}
|
||||||
if (_log.shouldLog(Log.WARN))
|
if (_log.shouldLog(Log.DEBUG))
|
||||||
_log.warn("Peers with capacity " + capability + ": " + rv.size());
|
_log.debug("Peers with capacity " + capability + ": " + rv.size());
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -302,13 +302,13 @@ public class PeerProfile {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_log.shouldLog(Log.WARN) ) {
|
if (_log.shouldLog(Log.DEBUG) ) {
|
||||||
StringBuffer buf = new StringBuffer(128);
|
StringBuffer buf = new StringBuffer(128);
|
||||||
buf.append("Updating 1m throughput after ").append(size).append(" to ");
|
buf.append("Updating 1m throughput after ").append(size).append(" to ");
|
||||||
for (int i = 0; i < THROUGHPUT_COUNT; i++)
|
for (int i = 0; i < THROUGHPUT_COUNT; i++)
|
||||||
buf.append(_peakTunnel1mThroughput[i]).append(',');
|
buf.append(_peakTunnel1mThroughput[i]).append(',');
|
||||||
buf.append(" for ").append(_peer.toBase64());
|
buf.append(" for ").append(_peer.toBase64());
|
||||||
_log.warn(buf.toString());
|
_log.debug(buf.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -124,8 +124,8 @@ class FIFOBandwidthRefiller implements Runnable {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
if (_log.shouldLog(Log.WARN))
|
if (_log.shouldLog(Log.DEBUG))
|
||||||
_log.warn("Refresh delay too fast (" + numMs + ")");
|
_log.debug("Refresh delay too fast (" + numMs + ")");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -110,8 +110,8 @@ public class InboundMessageFragments /*implements UDPTransport.PartialACKSource
|
|||||||
_context.statManager().addRateData("udp.ignoreRecentDuplicate", 1, 0);
|
_context.statManager().addRateData("udp.ignoreRecentDuplicate", 1, 0);
|
||||||
from.messageFullyReceived(messageId, -1);
|
from.messageFullyReceived(messageId, -1);
|
||||||
_ackSender.ackPeer(from);
|
_ackSender.ackPeer(from);
|
||||||
if (_log.shouldLog(Log.WARN))
|
if (_log.shouldLog(Log.INFO))
|
||||||
_log.warn("Message received is a dup: " + mid + " dups: "
|
_log.info("Message received is a dup: " + mid + " dups: "
|
||||||
+ _recentlyCompletedMessages.getCurrentDuplicateCount() + " out of "
|
+ _recentlyCompletedMessages.getCurrentDuplicateCount() + " out of "
|
||||||
+ _recentlyCompletedMessages.getInsertedCount());
|
+ _recentlyCompletedMessages.getInsertedCount());
|
||||||
_context.messageHistory().droppedInboundMessage(mid, from.getRemotePeer(), "dup");
|
_context.messageHistory().droppedInboundMessage(mid, from.getRemotePeer(), "dup");
|
||||||
|
Reference in New Issue
Block a user