Forum Discussion
Robert_Reznicek
Nimbostratus
Apr 14, 2010printing variables values
Is it possible to use another method for printing, that log command?
I need to print items of array for debug purposes (approx. 1000 items) and i found out, that when using log command in foreach loop, some entries are omitted, because of syslog limitations. I also tried to use HTTP:respond and return the values in "content" section, but this is not possible.
I suppose it is not possible to use "puts" command and define somehow channel for printing.
4 Replies
Sort By
- hoolio
Cirrostratus
Hi Robert,when RULE_INIT { load up an array for {set i 0} {$i < 1000} {incr i} { set ::arr($i) "value$i" log local0. "\$i-1000: $i" } log local0. "size: [array size ::arr]" } when HTTP_REQUEST { HTTP::respond 200 content [array get ::arr] }
- Robert_Reznicek
Nimbostratus
Hi Aaron,HTTP::respond 200 content [array names ::arr]
- hoolio
Cirrostratus
That's odd. In 10.0.1, I've received as much as 1.7MB using this:when RULE_INIT { for {set i 0} {$i < 100000} {incr i} { set ::arr($i) "value$i" log local0. "\$i-1000: $i" } log local0. "size: [array size ::arr]" } when HTTP_REQUEST { HTTP::respond 200 content [array get ::arr] }
- Robert_Reznicek
Nimbostratus
I found it, I put "drop" command behind the HTTP::respond. When removed, i get the whole array.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects