Re: Using Settings
Jan Wielemaker <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
On 02/04/2014 03:08 AM, Anne Ogborn wrote: > OK, another snag. > > I want to rebase this server. > > I have various servers I'm working on on my machine, and want to rebase only this one, > but I can't set http:prefix in my local settings.conf file? I'd typically assume that every server has its own settings.conf. If that is not the case, you can call set_setting_default *before* loading the settings file, which will change the default value for the calling process. Of course, you should not put a value in the config file in that case. > > 14 ?- use_module(library(http/http_path)). > true. > > 15 ?- setting(X, Y). > false. This only lists settings in the calling module. To enumerate all settings, you need setting(Module:Name, Value). That is similar to current_predicate/1 and all other module-sensitive predicates. P.s. mode(-,-) was broken. Just pushed a patch. > 16 ?- set_setting(http:prefix, '/crane'). > ERROR: setting `prefix' does not exist It seems to be defined in ClioPatria's parms.pl. At some point, the overall idea was to rebase a server by changing the HTTP path alias for root. This change never materialized. So, the above only works for ClioPatria. Otherwise you must define http:prefix. It is a bit of a mess :-( Possibly the right solution is to add it to library(http/http_path) and decide we won't change this further? Cheers --- Jan > 17 ?- save_settings. > true. > > 18 ?- list_settings. > ======================================================================== > Name Value (*=modified) Comment > ======================================================================== > http:chunked_transfer on_request When to use Transfer-Encoding: Chunked > http:public_host '' Name the outside world can use to contact me > http:public_port 80 Port on the public server > http:public_scheme http Default URL scheme to use > http:time_limit 300 Time limit handling a single query (0=infinite) > listing:body_indentation 8 Indentation used goals in the body > listing:tab_distance 8 Distance between tab-stops. 0 uses only spaces > listing:cut_on_same_line true Place cuts (!) on the same line > listing:line_width 78 Width of a line. 0 is infinite > prolog_pack:server 'http://www.swi-prolog.org/pack/' Server to exchange pack information > cranegame:debug_port 14000 Port to run the Crane Game on in debug mode. > cranegame:production_port 14000 Port to run the Crane Game on in production mode. > true. > > > Perusing cliopatria code leaves me semibaffled. > > ::Annie is here, hiding from ClioPatria behind a semibaffle:: > -------------- next part -------------- > HTML attachment scrubbed and removed > _______________________________________________ > SWI-Prolog mailing list > [email protected] > https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog >