forked from I2P_Developers/i2p.i2p
logging
This commit is contained in:
@ -42,6 +42,7 @@ public class SendMessageDirectJob extends JobImpl {
|
|||||||
private MessageSelector _selector;
|
private MessageSelector _selector;
|
||||||
private boolean _alreadySearched;
|
private boolean _alreadySearched;
|
||||||
private boolean _sent;
|
private boolean _sent;
|
||||||
|
private long _searchOn;
|
||||||
|
|
||||||
private final static long DEFAULT_TIMEOUT = 60*1000;
|
private final static long DEFAULT_TIMEOUT = 60*1000;
|
||||||
|
|
||||||
@ -62,6 +63,7 @@ public class SendMessageDirectJob extends JobImpl {
|
|||||||
_router = null;
|
_router = null;
|
||||||
_expiration = expiration;
|
_expiration = expiration;
|
||||||
_priority = priority;
|
_priority = priority;
|
||||||
|
_searchOn = 0;
|
||||||
_alreadySearched = false;
|
_alreadySearched = false;
|
||||||
_onSend = onSend;
|
_onSend = onSend;
|
||||||
_onSuccess = onSuccess;
|
_onSuccess = onSuccess;
|
||||||
@ -111,11 +113,13 @@ public class SendMessageDirectJob extends JobImpl {
|
|||||||
_log.debug("Router not specified, so we're looking for it...");
|
_log.debug("Router not specified, so we're looking for it...");
|
||||||
_context.netDb().lookupRouterInfo(_targetHash, this, this,
|
_context.netDb().lookupRouterInfo(_targetHash, this, this,
|
||||||
_expiration - _context.clock().now());
|
_expiration - _context.clock().now());
|
||||||
|
_searchOn = _context.clock().now();
|
||||||
_alreadySearched = true;
|
_alreadySearched = true;
|
||||||
} else {
|
} else {
|
||||||
if (_log.shouldLog(Log.ERROR))
|
if (_log.shouldLog(Log.WARN))
|
||||||
_log.error("Unable to find the router to send to: " + _targetHash
|
_log.warn("Unable to find the router to send to: " + _targetHash
|
||||||
+ " message: " + _message, getAddedBy());
|
+ " after searching for " + (_context.clock().now()-_searchOn)
|
||||||
|
+ "ms, message: " + _message, getAddedBy());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user