Forum Discussion

steve_111974's avatar
steve_111974
Icon for Nimbostratus rankNimbostratus
Aug 18, 2008

using the logging command produce TCL error

Hi,

 

 

I'm just trying to create a simple irule which looks for anything that begins with /invoices and forward it to a different pool member. Below is my irule.

 

 

Redirect EIPP to Proxy Server

 

when HTTP_REQUEST {

 

log local0 "Request: [HTTP::uri] being redirected"

 

if { [HTTP::uri] starts_with "/invoices" } {

 

 

pool {WEBDEV_Proxy-EIPP}

 

}

 

 

}

 

 

It's not working so I put in the "log local0" command but I'm getting this from the log.

 

 

TCL error: Rule WEBDEV_Rdrt_EIPP HTTP_REQUEST - wrong args: should be log message while executing log local0 Request: [HTTP::uri] being redirected

 

 

Any idea why?

 

 

Is there a easier way to do my irule. I saw a sample using the "switch" command, but I keep getting a syntax error.

 

 

thanks.

 

1 Reply

  • Try to add a "." after local0:

     
     when HTTP_REQUEST { 
         log local0. "Request: [HTTP::uri] being redirected" 
         if { [HTTP::uri] starts_with "/invoices" } { 
           pool {WEBDEV_Proxy-EIPP} 
         } 
     }