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, "Jamie Cameron&quo= t; <<a href=3D"mailto:[email protected]">[email protected]</a>> 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 <<a href=3D"mailto:emma.wasanzy@gmail.= com">[email protected]</a>> wrote ..<br> > Hello,<br> ><br> > Can anyone tell me what the problem with this part of code. Is part of= the<br> > webmin module am writing for tomcat.<br> ><br> ><br> > if ( $instance eq "tomcat5" ){<br> > =A0 =A0 if ( $log_type eq "catalina.out") {<br> > =A0 =A0 =A0 =A0 if ( $num_day eq "current" ) {<br> > =A0 =A0 =A0 =A0 =A0 =A0 $tomcat_log =3D "/var/log/tomcat5/catalin= a.out";<br> > =A0 =A0 =A0 =A0 }<br> > =A0 =A0 =A0 =A0 else {<br> > =A0 =A0 =A0 =A0 =A0 =A0 $tomcat_log =3D "/var/log/tomcat5/catalin= a.out-$day.gz";<br> > =A0 =A0 =A0 =A0 }<br> > =A0 =A0 }<br> > =A0 =A0 elsif ( $log_type eq "access_log" ) {<br> > =A0 =A0 =A0 =A0 if ( $num_day eq "current") {<br> > =A0 =A0 =A0 =A0 =A0 =A0 $tomcat_log =3D<br> > "/var/log/tomcat5/access-logs/tomcat_access.log-$current";<b= r> > =A0 =A0 =A0 =A0 }<br> > =A0 =A0 =A0 =A0 else {<br> > =A0 =A0 =A0 =A0 =A0 =A0 $tomcat_log =3D<br> > "/var/log/tomcat5/access-logs/tomcat_access.log-$inday.gz";<= br> > =A0 =A0 =A0 =A0 }<br> > =A0 =A0 }<br> > }<br> > else {<br> > =A0 =A0 if ( $log_type eq "catalina.out" ) {<br> > =A0 =A0 =A0 =A0 if ( $num_day eq "current" ) {<br> > =A0 =A0 =A0 =A0 =A0 =A0 $tomcat_log =3D "/var/lib/$instance/logs/= catalina.out";<br> > =A0 =A0 =A0 =A0 }<br> > =A0 =A0 =A0 =A0 else {<br> > =A0 =A0 =A0 =A0 =A0 =A0 $tomcat_log =3D "/var/lib/$instance/logs/= catalina.out-$day.gz";<br> > =A0 =A0 =A0 =A0 }<br> > =A0 =A0 }<br> > =A0 =A0 elsif ($log_type eq "access_log" ) {<br> > =A0 =A0 =A0 =A0 if ( $num_day eq "current") {<br> > =A0 =A0 =A0 =A0 =A0 =A0 $tomcat_log =3D<br> > "/var/lib/$instance/access-logs/tomcat_access.log-$current";= <br> > =A0 =A0 =A0 =A0 }<br> > =A0 =A0 =A0 =A0 else {<br> > =A0 =A0 =A0 =A0 =A0 =A0 $tomcat_log =3D<br> > "/var/lib/$instance/access-logs/tomcat_access.log-$inday.gz"= ;<br> > =A0 =A0 =A0 =A0 }<br> > =A0 =A0 }<br> > }<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==--