incubator-cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wido den Hollander" <w...@widodh.nl>
Subject Review Request: Do not log null lines in logfile
Date Wed, 01 Aug 2012 17:18:15 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/6287/
-----------------------------------------------------------

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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message