[prev in list] [next in list] [prev in thread] [next in thread] 

List:       webmin-l
Subject:    [webmin-l] Block of code
From:       Emma wasanzy <emma.wasanzy () gmail ! com>
Date:       2013-03-18 20:20:33
Message-ID: CALgYh1FYpe789s-9ebDWh3-ufMfHFnYwpDFrvdO=ruPDrudvMw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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";
        }
    }
}

[Attachment #5 (text/html)]

<div dir="ltr">Hello, <div><br></div><div style>Can anyone tell me what the problem \
with this part of code. Is part of the webmin module am writing for tomcat. \
</div><div style><br></div><div style><br></div><div style><div>

if ( $instance eq &quot;tomcat5&quot; ){</div><div>    if ( $log_type eq \
&quot;catalina.out&quot;) {</div><div>        if ( $num_day eq &quot;current&quot; ) \
{</div><div>            $tomcat_log = \
&quot;/var/log/tomcat5/catalina.out&quot;;</div>

<div>        }</div><div>        else {</div><div>            $tomcat_log = \
&quot;/var/log/tomcat5/catalina.out-$day.gz&quot;;</div><div>        }</div><div>    \
}</div><div>    elsif ( $log_type eq &quot;access_log&quot; ) {</div>

<div>        if ( $num_day eq &quot;current&quot;) {</div><div>            \
$tomcat_log = &quot;/var/log/tomcat5/access-logs/tomcat_access.log-$current&quot;;</div><div> \
}</div><div>        else {</div><div>            $tomcat_log = \
&quot;/var/log/tomcat5/access-logs/tomcat_access.log-$inday.gz&quot;;</div>

<div>        }</div><div>    }</div><div>}</div><div>else {</div><div>    if ( \
$log_type eq &quot;catalina.out&quot; ) {</div><div>        if ( $num_day eq \
&quot;current&quot; ) {</div><div>            $tomcat_log = \
&quot;/var/lib/$instance/logs/catalina.out&quot;;</div>

<div>        }</div><div>        else {</div><div>            $tomcat_log = \
&quot;/var/lib/$instance/logs/catalina.out-$day.gz&quot;;</div><div>        \
}</div><div>    }</div><div>    elsif ($log_type eq &quot;access_log&quot; ) {  \
</div>

<div>        if ( $num_day eq &quot;current&quot;) {</div><div>            \
$tomcat_log = &quot;/var/lib/$instance/access-logs/tomcat_access.log-$current&quot;;</div><div> \
}   </div><div>        else {</div><div>            $tomcat_log = \
&quot;/var/lib/$instance/access-logs/tomcat_access.log-$inday.gz&quot;;</div>

<div>        }</div><div>    }</div><div>}</div></div><div style><br></div><div \
style><br></div></div>



------------------------------------------------------------------------------
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 mailing list at webadmin-list@lists.sourceforge.net
To remove yourself from this list, go to
http://lists.sourceforge.net/lists/listinfo/webadmin-list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic