cancel
Showing results for 
Search instead for 
Did you mean: 

Can't use request logging profile's variables

LeonidX
Nimbostratus
Nimbostratus

when HTTP_REQUEST...

TCL error  can't read "DATE_DD": no such variable while executing "HSL::send $hsl "$DATE_DD $TIME_HMS $BIGIP_HOSTNAME...

Is it even possible to use these dynamic variables?

 

 

2 REPLIES 2

CA_Valli
Cumulonimbus
Cumulonimbus

Hello, variables in iRules have three scopes: local, static, and global. 

Your syntax would assume a local variable is set.  If nowhere in your code there's a statement to create and set "DATE_DD" value, you'll get the error you're seeing.

Local variables are scoped to the connection, and are deleted when the connection is cleared.

 

The type of information you're trying to retrieve is available, you need proper syntax to call it, example:

set now [clock format [clock seconds] -format "%d/%b/%Y:%H:%M:%S %z"]

  

Hello, log command has syntax to specify both facility and level, 

log facilities are mapped to local log files, example local0 is "/var/log/ltm" ; while severity is specified after the facility, example:

log local0.emerg "this log is emergency level in LTM log file" 

Check https://support.f5.com/csp/article/K55131641 for more details