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 - If your post was solved it would be helpful to the community if you selected *Accept As Solution* on the relevant reply (or replies). This helps future readers find answers more quickly and confirms the efforts of those who helped. Thanks for being part of our community.
Not sure it was solved - defintely confirmed
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