mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-16 10:32:34 +01:00
Merge pull request #1143 from wido/agent-ping-name
Show Agent name in Ping responseBefore: <pre>DEBUG [c.c.a.m.AgentManagerImpl] (AgentManager-Handler-4:null) Ping from 66</pre> After: <pre>DEBUG [c.c.a.m.AgentManagerImpl] (AgentManager-Handler-4:null) Ping from 66 (n01)</pre> Makes it easier to search for hosts in the logs. Most loglines contain both the hostId and hostName. * pr/1143: Show Agent name in Ping response Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
commit
d31b58fe94
@ -1181,15 +1181,16 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
|
||||
}
|
||||
|
||||
final long hostId = attache.getId();
|
||||
final String hostName = attache.getName();
|
||||
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
if (cmd instanceof PingRoutingCommand) {
|
||||
logD = false;
|
||||
s_logger.debug("Ping from " + hostId);
|
||||
s_logger.debug("Ping from " + hostId + "(" + hostName + ")");
|
||||
s_logger.trace("SeqA " + hostId + "-" + request.getSequence() + ": Processing " + request);
|
||||
} else if (cmd instanceof PingCommand) {
|
||||
logD = false;
|
||||
s_logger.debug("Ping from " + hostId);
|
||||
s_logger.debug("Ping from " + hostId + "(" + hostName + ")");
|
||||
s_logger.trace("SeqA " + attache.getId() + "-" + request.getSequence() + ": Processing " + request);
|
||||
} else {
|
||||
s_logger.debug("SeqA " + attache.getId() + "-" + request.getSequence() + ": Processing " + request);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user