Forum OpenACS Q&A: Re: Aolserver 4.5 multithreading

Collapse
Posted by Tom Jackson on

Jay,

I'm going to post here a little script which you can run to produce the actual contents of your config after startup.

You can run this in a tcl page, or during startup (which helps if the server doesn't actually startup).

I'm asking you to do this so that it is easy to figure out what settings are being used, and to avoid any extra junk.

namespace eval ::config {
 
    set Debug 1
    
    if {[info exists Debug] && $Debug} {
	
	set sections [ns_configsections]
	
	set output [list]
	
	foreach section $sections {
	    set name [ns_set name $section]
	    set section_txt ""
	    append section_txt "ns_section $name\n"
	    
	    set size [ns_set size $section]
	    for {set i 0} {$i < $size} {incr i} {
		append section_txt "\t[list ns_param [ns_set key $section $i] [ns_set value $section $i]]\n"
	    }
	    lappend output $section_txt
	    
	}
	set output "[join [lsort $output] "\n"]\n"
	puts "\n$output\n"
    }
 
}

ns_log does not work in a config script, the calls may show up if the server starts up, but will not if there is an error, you can use puts as above.