Re: [webmin-devel] Block of code

Emma wasanzy <[email protected]> Tue, 19 Mar 2013 06:11:25 +0000
Newsgroups gmane.comp.web.webmin.devel
Message-ID <CALgYh1EjDp_RQbUD9bNoZoCNftxd0vQvMN--y8_ceupgH3Miew@mail.gmail.com>
--===============1912044811015562426==
Content-Type: multipart/alternative; boundary=089e0139ff30b2022c04d840f9b7

--089e0139ff30b2022c04d840f9b7
Content-Type: text/plain; charset=ISO-8859-1

Thank you Jamie, I have solved the problem.
On Mar 19, 2013 4:32 AM, "Jamie Cameron" <[email protected]> wrote:

> Can you give us more details about what is going wrong with this
> code exactly?
>
> On 18/Mar/2013 13:20 Emma wasanzy <[email protected]> wrote ..
> > Hello,
> >
> > Can anyone tell me what the problem with this part of code. Is part of
> the
> > webmin module am writing for tomcat.
> >
> >
> > if ( $instance eq "tomcat5" ){
> >     if ( $log_type eq "catalina.out") {
> >         if ( $num_day eq "current" ) {
> >             $tomcat_log = "/var/log/tomcat5/catalina.out";
> >         }
> >         else {
> >             $tomcat_log = "/var/log/tomcat5/catalina.out-$day.gz";
> >         }
> >     }
> >     elsif ( $log_type eq "access_log" ) {
> >         if ( $num_day eq "current") {
> >             $tomcat_log =
> > "/var/log/tomcat5/access-logs/tomcat_access.log-$current";
> >         }
> >         else {
> >             $tomcat_log =
> > "/var/log/tomcat5/access-logs/tomcat_access.log-$inday.gz";
> >         }
> >     }
> > }
> > else {
> >     if ( $log_type eq "catalina.out" ) {
> >         if ( $num_day eq "current" ) {
> >             $tomcat_log = "/var/lib/$instance/logs/catalina.out";
> >         }
> >         else {
> >             $tomcat_log = "/var/lib/$instance/logs/catalina.out-$day.gz";
> >         }
> >     }
> >     elsif ($log_type eq "access_log" ) {
> >         if ( $num_day eq "current") {
> >             $tomcat_log =
> > "/var/lib/$instance/access-logs/tomcat_access.log-$current";
> >         }
> >         else {
> >             $tomcat_log =
> > "/var/lib/$instance/access-logs/tomcat_access.log-$inday.gz";
> >         }
> >     }
> > }
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_mar
> -
> Forwarded by the Webmin development list at [email protected]
> To remove yourself from this list, go to
> http://lists.sourceforge.net/lists/listinfo/webadmin-devel
>

--089e0139ff30b2022c04d840f9b7
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<p>Thank you Jamie, I have solved the problem.</p>
<div class=3D"gmail_quote">On Mar 19, 2013 4:32 AM, &quot;Jamie Cameron&quo=
t; &lt;<a href=3D"mailto:[email protected]">[email protected]</a>&gt; w=
rote:<br type=3D"attribution"><blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Can you give us more details about what is going wrong with this<br>
code exactly?<br>
<br>
On 18/Mar/2013 13:20 Emma wasanzy &lt;<a href=3D"mailto:emma.wasanzy@gmail.=
com">[email protected]</a>&gt; wrote ..<br>
&gt; Hello,<br>
&gt;<br>
&gt; Can anyone tell me what the problem with this part of code. Is part of=
 the<br>
&gt; webmin module am writing for tomcat.<br>
&gt;<br>
&gt;<br>
&gt; if ( $instance eq &quot;tomcat5&quot; ){<br>
&gt; =A0 =A0 if ( $log_type eq &quot;catalina.out&quot;) {<br>
&gt; =A0 =A0 =A0 =A0 if ( $num_day eq &quot;current&quot; ) {<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 $tomcat_log =3D &quot;/var/log/tomcat5/catalin=
a.out&quot;;<br>
&gt; =A0 =A0 =A0 =A0 }<br>
&gt; =A0 =A0 =A0 =A0 else {<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 $tomcat_log =3D &quot;/var/log/tomcat5/catalin=
a.out-$day.gz&quot;;<br>
&gt; =A0 =A0 =A0 =A0 }<br>
&gt; =A0 =A0 }<br>
&gt; =A0 =A0 elsif ( $log_type eq &quot;access_log&quot; ) {<br>
&gt; =A0 =A0 =A0 =A0 if ( $num_day eq &quot;current&quot;) {<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 $tomcat_log =3D<br>
&gt; &quot;/var/log/tomcat5/access-logs/tomcat_access.log-$current&quot;;<b=
r>
&gt; =A0 =A0 =A0 =A0 }<br>
&gt; =A0 =A0 =A0 =A0 else {<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 $tomcat_log =3D<br>
&gt; &quot;/var/log/tomcat5/access-logs/tomcat_access.log-$inday.gz&quot;;<=
br>
&gt; =A0 =A0 =A0 =A0 }<br>
&gt; =A0 =A0 }<br>
&gt; }<br>
&gt; else {<br>
&gt; =A0 =A0 if ( $log_type eq &quot;catalina.out&quot; ) {<br>
&gt; =A0 =A0 =A0 =A0 if ( $num_day eq &quot;current&quot; ) {<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 $tomcat_log =3D &quot;/var/lib/$instance/logs/=
catalina.out&quot;;<br>
&gt; =A0 =A0 =A0 =A0 }<br>
&gt; =A0 =A0 =A0 =A0 else {<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 $tomcat_log =3D &quot;/var/lib/$instance/logs/=
catalina.out-$day.gz&quot;;<br>
&gt; =A0 =A0 =A0 =A0 }<br>
&gt; =A0 =A0 }<br>
&gt; =A0 =A0 elsif ($log_type eq &quot;access_log&quot; ) {<br>
&gt; =A0 =A0 =A0 =A0 if ( $num_day eq &quot;current&quot;) {<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 $tomcat_log =3D<br>
&gt; &quot;/var/lib/$instance/access-logs/tomcat_access.log-$current&quot;;=
<br>
&gt; =A0 =A0 =A0 =A0 }<br>
&gt; =A0 =A0 =A0 =A0 else {<br>
&gt; =A0 =A0 =A0 =A0 =A0 =A0 $tomcat_log =3D<br>
&gt; &quot;/var/lib/$instance/access-logs/tomcat_access.log-$inday.gz&quot;=
;<br>
&gt; =A0 =A0 =A0 =A0 }<br>
&gt; =A0 =A0 }<br>
&gt; }<br>
<br>
---------------------------------------------------------------------------=
---<br>
Everyone hates slow websites. So do we.<br>
Make your web apps faster with AppDynamics<br>
Download AppDynamics Lite for free today:<br>
<a href=3D"http://p.sf.net/sfu/appdyn_d2d_mar" target=3D"_blank">http://p.s=
f.net/sfu/appdyn_d2d_mar</a><br>
-<br>
Forwarded by the Webmin development list at <a href=3D"mailto:webmin-devel@=
webmin.com">[email protected]</a><br>
To remove yourself from this list, go to<br>
<a href=3D"http://lists.sourceforge.net/lists/listinfo/webadmin-devel" targ=
et=3D"_blank">http://lists.sourceforge.net/lists/listinfo/webadmin-devel</a=
><br>
</blockquote></div>

--089e0139ff30b2022c04d840f9b7--


--===============1912044811015562426==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
--===============1912044811015562426==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-
Forwarded by the Webmin development list at [email protected]
To remove yourself from this list, go to
http://lists.sourceforge.net/lists/listinfo/webadmin-devel

--===============1912044811015562426==--