Forum Discussion
irule proc with default values failing
- Jul 28, 2022
Hi
when i try this
rule proc_lib {
proc loggingNowStr2 { {log_now_clock 0} {log_now_msec 0} } {
}}
i get this
01070151:3: Rule [/Common/YB_SOEv2_Platform_logging_v1.1] error: /Common/YB_SOEv2_Platform_logging_v1.1:53: error: [undefined procedure: rule][rule proc_lib {
proc loggingNowStr2 { {log_now_clock 0} {log_now_msec 0} } {
}
}]I have my proc outside rule proc_lib
why do you use rule proc_lib ?
I tried your code - started a new irule and got this error
01070151:3: Rule [/Common/test] error: /Common/test:1: error: [undefined procedure: rule][rule proc_lib {
proc loggingNowStr { {log_now_clock 123456789} {log_now_msec 78341239432} } {
set log_now_diff [expr { $log_now_msec - ( $log_now_clock * 1000 ) }]
incr log_now_clock [ expr { $log_now_diff / 1000 }]
set log_now_fract [expr { $log_now_diff % 1000 }]
set log_now_fract [format "%03d" $log_now_fract]
set log_now_start_time_str [clock format $log_now_clock -format "%Y-%m-%d %H:%M:%S.${log_now_fract}"]
return $log_now_start_time_str
}
}]
AlexS_yb - I presume you haven't seen a resolution to this issue? If not I'll risk pinging JRahm here because iRules are his jam. 🙂
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com