Return-Path: X-Original-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9DDB5D8BB for ; Wed, 1 Aug 2012 23:33:29 +0000 (UTC) Received: (qmail 62440 invoked by uid 500); 1 Aug 2012 23:33:29 -0000 Delivered-To: apmail-incubator-cloudstack-dev-archive@incubator.apache.org Received: (qmail 62407 invoked by uid 500); 1 Aug 2012 23:33:29 -0000 Mailing-List: contact cloudstack-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-dev@incubator.apache.org Received: (qmail 62397 invoked by uid 99); 1 Aug 2012 23:33:29 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Aug 2012 23:33:29 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 87C481C1924; Wed, 1 Aug 2012 23:33:28 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============8817027987197203269==" MIME-Version: 1.0 Subject: Re: Review Request: Do not log null lines in agent logfile From: "Wido den Hollander" To: "Wido den Hollander" , "cloudstack" , "edison su" Date: Wed, 01 Aug 2012 23:33:28 -0000 Message-ID: <20120801233328.22302.62902@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Wido den Hollander" X-ReviewGroup: cloudstack X-ReviewRequest-URL: https://reviews.apache.org/r/6287/ X-Sender: "Wido den Hollander" References: <20120801222614.22302.67794@reviews.apache.org> In-Reply-To: <20120801222614.22302.67794@reviews.apache.org> Reply-To: "Wido den Hollander" --===============8817027987197203269== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable > On Aug. 1, 2012, 10:26 p.m., edison su wrote: > > The request o response is null, is not because they are null, it's beca= use, the loglevel set on the command class or member of command class. Take= GetHostStatsCommand as an example, it has set loglevel as @LogLevel(Log4jL= evel.Trace), so unless the loglevel is set to Trace in log4j, the request.t= ostring returns null. I add a fix. I see that you implement something like I suggested. I still my agent logging "null" responses however: 2012-08-02 01:32:36,090 DEBUG [cloud.agent.Agent] (agentRequest-Handler-3:n= ull) Processing command: com.cloud.agent.api.GetStorageStatsCommand 2012-08-02 01:32:37,378 DEBUG [cloud.agent.Agent] (agentRequest-Handler-3:n= ull) null 2012-08-02 01:32:51,258 DEBUG [cloud.agent.Agent] (agentRequest-Handler-4:n= ull) Processing command: com.cloud.agent.api.GetVmStatsCommand 2012-08-02 01:32:51,303 DEBUG [cloud.agent.Agent] (agentRequest-Handler-4:n= ull) null Shouldn't we do the same for the responses? - Wido ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/6287/#review9726 ----------------------------------------------------------- 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 comman= d: 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 pr= event logging empty lines. > = > I just want to make sure I'm not missing something here, since bad loggin= g 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 > = > --===============8817027987197203269==--