[From nobody Fri Aug 2 12:00:13 2013 From: Radek Novacek <reviewboard@gallagherhome.com> Precedence: list MIME-Version: 1.0 To: "Roman Rakus" <rrakus@redhat.com>, "OpenLMI Developers" <openlmi-reviews@lists.fedorahosted.org>, "Radek Novacek" <rnovacek@redhat.com> References: <20130801150741.713.86606@ex-std-node147.prod.rhcloud.com> In-Reply-To: <20130801150741.713.86606@ex-std-node147.prod.rhcloud.com> Date: Fri, 02 Aug 2013 07:20:39 -0000 Reply-To: Radek Novacek <rnovacek@redhat.com>, openlmi-reviews@lists.fedorahosted.org Message-ID: <20130802072039.713.54199@ex-std-node147.prod.rhcloud.com> Content-Type: multipart/alternative; boundary="===============0134893180183565109==" Subject: Re: Review Request 670: openlmi-providers [1/1] Add logging to the openlmi-mof-register script Message: 10 --===============0134893180183565109== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit > On Aug. 1, 2013, 5:07 p.m., Roman Rakus wrote: > > openlmi-mof-register, line 115 > > <http://reviewboard-openlmi.rhcloud.com/r/670/diff/2/?file=3835#file3835line115> > > > > It looks ugly. > > log "COMMAND: " 'cat "$reg" | ...' > > > > if the commands and/or parameters don't have single quotes quoting, you can simple copy&paste and encapsulate in single quotes. > > > > Anyway, isn't better to log message like "registering mof file"? But when I encapsulate something in single quotes, I will lose the variable expansion and it'll log `cat "$reg" ...` instead of `cat "mof/60_LMI_Fan.mof" ...`. - Radek ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/670/#review848 ----------------------------------------------------------- On Aug. 1, 2013, 4:37 p.m., Radek Novacek wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://reviewboard-openlmi.rhcloud.com/r/670/ > ----------------------------------------------------------- > > (Updated Aug. 1, 2013, 4:37 p.m.) > > > Review request for OpenLMI Developers. > > > Repository: openlmi-providers > > > Description > ------- > > Add logging to the openlmi-mof-register script > > Each command in the registration script is now logged into > /var/log/openlmi-install.log file. > > > Diffs > ----- > > openlmi-mof-register 4e60e31786e22b063e4c3a42116e05038f5275c3 > openlmi-providers.spec 0552a8cc01c8c3979a2304463f0a663fcc993a95 > > Diff: http://reviewboard-openlmi.rhcloud.com/r/670/diff/ > > > Testing > ------- > > > Thanks, > > Radek Novacek > > --===============0134893180183565109== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit <html> <body> <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;"> <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;"> <tr> <td> This is an automatically generated e-mail. To reply, visit: <a href="http://reviewboard-openlmi.rhcloud.com/r/670/">http://reviewboard-openlmi.rhcloud.com/r/670/</a> </td> </tr> </table> <br /> <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;"> <p style="margin-top: 0;">On August 1st, 2013, 5:07 p.m. CEST, <b>Roman Rakus</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;"> <table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;"> <thead> <tr> <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;"> <a href="http://reviewboard-openlmi.rhcloud.com/r/670/diff/2/?file=3835#file3835line115" style="color: black; font-weight: bold; text-decoration: underline;">openlmi-mof-register</a> <span style="font-weight: normal;"> (Diff revision 2) </span> </th> </tr> </thead> <tbody> <tr> <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">115</font></th> <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> log &quot;COMMAND: cat \&quot;$reg\&quot; | $(dirname $0)/openlmi-register-pegasus -v \&quot;$version\&quot; | $CIMMOF -uc -n root/interop&quot;</pre></td> </tr> </tbody> </table> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">It looks ugly. log &quot;COMMAND: &quot; &#39;cat &quot;$reg&quot; | ...&#39; if the commands and/or parameters don&#39;t have single quotes quoting, you can simple copy&amp;paste and encapsulate in single quotes. Anyway, isn&#39;t better to log message like &quot;registering mof file&quot;?</pre> </blockquote> </blockquote> <pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">But when I encapsulate something in single quotes, I will lose the variable expansion and it&#39;ll log `cat &quot;$reg&quot; ...` instead of `cat &quot;mof/60_LMI_Fan.mof&quot; ...`.</pre> <br /> <p>- Radek</p> <br /> <p>On August 1st, 2013, 4:37 p.m. CEST, Radek Novacek wrote:</p> <table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://reviewboard-openlmi.rhcloud.com/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;"> <tr> <td> <div>Review request for OpenLMI Developers.</div> <div>By Radek Novacek.</div> <p style="color: grey;"><i>Updated Aug. 1, 2013, 4:37 p.m.</i></p> <div style="margin-top: 1.5em;"> <b style="color: #575012; font-size: 10pt;">Repository: </b> openlmi-providers </div> <h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1> <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0"> <tr> <td> <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Add logging to the openlmi-mof-register script Each command in the registration script is now logged into /var/log/openlmi-install.log file. </pre> </td> </tr> </table> <h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1> <ul style="margin-left: 3em; padding-left: 0;"> <li>openlmi-mof-register <span style="color: grey">(4e60e31786e22b063e4c3a42116e05038f5275c3)</span></li> <li>openlmi-providers.spec <span style="color: grey">(0552a8cc01c8c3979a2304463f0a663fcc993a95)</span></li> </ul> <p><a href="http://reviewboard-openlmi.rhcloud.com/r/670/diff/" style="margin-left: 3em;">View Diff</a></p> </td> </tr> </table> </div> </body> </html> --===============0134893180183565109==-- ]