#61 Provide access to default configuration

Feature Request
open
nobody
1
2006-12-01
2006-07-11
No

Make all configuration options visible (log file) and
accessible (ns_config) as well as their default values.

While it is possible to print out the configuration
after startup (Example 1 below), only the values set
up in the config file are visible.

When starting the server in the way that it logs
'debug' level messages (Example 2 below), a lot of
default values/ranges are logged but only for those
where Ns_Log('Debug') is set up. Some are still
missing (along with the defaults).

Is it possible to not only set variables internally
during startup but to also build the ns_set needed for
ns_config command in parallel?

Example 1-----Print config-------------------

set out [list]
foreach section [lsort [ns_configsections]] {
lappend out [string repeat - 80]
lappend out "[ns_set name $section]"
lappend out [string repeat - 80]
array set section_values [ns_set array $section]
foreach section_key [lsort [array names
section_values]] {
lappend out "$section_key: [set
section_values([set section_key])]"
}
array unset section_values
}
puts [join $outpuf "\n"]

Example 2-----Print config-------------------

...
config: ns/parameters:listenbacklog value=(null) min=0
max=2147483647 default=32 (int)
config: ns/parameters:dnscache value=(null)
default=true (bool)
config: ns/parameters:dnscachemaxsize value=(null)
min=0 max=2147483647 default=512000 (int)
config: ns/parameters:dnswaittimeout value=(null)
min=0 max=2147483647 default=5 (int)
config: ns/parameters:dnscachetimeout value=(null)
min=0 max=2147483647 default=60 (int)
...

Discussion

  • Stephen
    Stephen
    2006-12-01

    • labels: 711757 -->
    • milestone: 469717 -->
     
  • Stephen
    Stephen
    2006-12-01

    • labels: --> NaviServer - libnsd, libnsthread, nsd
    • milestone: --> Feature Request
    • priority: 5 --> 1