callback::subsite::parameter_changed::impl::acs-tcl (private)
callback::subsite::parameter_changed::impl::acs-tcl \ -package_id package_id -parameter parameter -value value
Defined in packages/acs-tcl/tcl/01-database-procs.tcl
Implementation of subsite::parameter_changed for acs-tcl.
- Switches:
- -package_id (required)
- the package_id of the package the parameter was changed for
- -parameter (required)
- the parameter name
- -value (required)
- the new value
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: ::callback::subsite::parameter_changed::contract__arg_parser {*}$args if {$parameter eq "DbLogMinDuration"} { set new_value [expr {$value/1000.0}] foreach pool [ns_db pools] { set ns_db_old_value [ns_time format [ns_db logminduration $pool]] set ns_db_old_ms [expr {int($ns_db_old_value * 1000)}] set old_ms $::acs::DbLogMinDuration ns_log notice "... pool $pool db old value $ns_db_old_value old_ms $old_ms ns_db_old_ms $ns_db_old_ms -> $new_value" if {$ns_db_old_value > $new_value || $old_ms == $ns_db_old_ms} { # # If the "ns_db_old_value" is larger (less SQL # logging) and the user wants more logging, then # reduce it. If there is already a more detailed # logging turned on then leave it as it is. # # If the old value was probably set via such parameter # settings, adjust as well. # # Note that "ns_db logminduration ..." has only an # effect when SQL logging is turned on. # # ns_logctl severity "Debug(sql)" on # ns_log notice "... adjust pool $pool old value $ns_db_old_value -> $new_value" ns_db logminduration $pool $new_valuex } } # # We could use nsv instead of the per-thread variable, such as # "nsv_set acs_properties DbLogMinDuration", which would be # faster to change, but slower to test. # ns_eval [list set ::acs::DbLogMinDuration $value] }XQL Not present: Generic, PostgreSQL, Oracle