* 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:
zzz
2008-06-01 20:24:43 +00:00
parent 02e7a19f65
commit 19992b1d1b
7 changed files with 18 additions and 18 deletions

View File

@ -93,8 +93,8 @@ public class ElGamalAESEngine {
decrypted = decryptExistingSession(data, key, targetPrivateKey, foundTags, usedKey, foundKey);
if (decrypted != null) {
_context.statManager().updateFrequency("crypto.elGamalAES.decryptExistingSession");
if ( (foundTags.size() > 0) && (_log.shouldLog(Log.WARN)) )
_log.warn(id + ": ElG/AES decrypt success with " + st + ": found tags: " + foundTags);
if ( (foundTags.size() > 0) && (_log.shouldLog(Log.DEBUG)) )
_log.debug(id + ": ElG/AES decrypt success with " + st + ": found tags: " + foundTags);
wasExisting = true;
} else {
_context.statManager().updateFrequency("crypto.elGamalAES.decryptFailed");
@ -107,8 +107,8 @@ public class ElGamalAESEngine {
decrypted = decryptNewSession(data, targetPrivateKey, foundTags, usedKey, foundKey);
if (decrypted != null) {
_context.statManager().updateFrequency("crypto.elGamalAES.decryptNewSession");
if ( (foundTags.size() > 0) && (_log.shouldLog(Log.WARN)) )
_log.warn("ElG decrypt success: found tags: " + foundTags);
if ( (foundTags.size() > 0) && (_log.shouldLog(Log.DEBUG)) )
_log.debug("ElG decrypt success: found tags: " + foundTags);
} else {
_context.statManager().updateFrequency("crypto.elGamalAES.decryptFailed");
if (_log.shouldLog(Log.WARN))

View File

@ -189,8 +189,8 @@ public class Rate {
long measuredPeriod = now - _lastCoalesceDate;
if (measuredPeriod < _period - SLACK) {
// no need to coalesce (assuming we only try to do so once per minute)
if (_log.shouldLog(Log.WARN))
_log.warn("not coalescing, measuredPeriod = " + measuredPeriod + " period = " + _period);
if (_log.shouldLog(Log.DEBUG))
_log.debug("not coalescing, measuredPeriod = " + measuredPeriod + " period = " + _period);
return;
}