----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/6287/#review9726 -----------------------------------------------------------
The request o response is null, is not because they are null, it's because, the loglevel set on the command class or member of command class. Take GetHostStatsCommand as an example, it has set loglevel as @LogLevel(Log4jLevel.Trace), so unless the loglevel is set to Trace in log4j, the request.tostring returns null. I add a fix. - edison su On Aug. 1, 2012, 5:18 p.m., Wido den Hollander wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/6287/ > ----------------------------------------------------------- > > (Updated Aug. 1, 2012, 5:18 p.m.) > > > Review request for cloudstack. > > > Description > ------- > > Do not fill the agent log with a lot of "null" lines. > > Not every command has a request and response, but we do log them. > > This causes a lot of log lines like: > > DEBUG [cloud.agent.Agent] (agentRequest-Handler-1:null) Request:null > DEBUG [cloud.agent.Agent] (agentRequest-Handler-1:null) Processing command: > com.cloud.agent.api.GetStorageStatsCommand > DEBUG [cloud.agent.Agent] (agentRequest-Handler-1:null) null > > By checking if the toString() method actually returns something we can > prevent logging empty lines. > > I just want to make sure I'm not missing something here, since bad logging > would make it hard for end-users to debug problems. > > > Diffs > ----- > > agent/src/com/cloud/agent/Agent.java babf0b3 > > Diff: https://reviews.apache.org/r/6287/diff/ > > > Testing > ------- > > > Thanks, > > Wido den Hollander > >