--control-console Run the server in a special monitor mode. This enables detailed
logging and exposes the raw control socket.
--loglevel=<LEVEL> Set the logging level.
---config Show the currently configuration. There are two optional values (defaul
- is empty). --config=diff will only show modified options. --config=default
- will show the default configuration.
+--config Show the currently configuration. There are three optional values:
+ --config=default show the default configuration.
+ --config=diff show modified options in the curent configuration.
+ --config=check parse the current configuration, with error checking.
--help To view more options that are available use this program.
See also
string configname=::arg()["config-dir"]+"/"+s_programname+".conf";
cleanSlashes(configname);
- if(!::arg().mustDo("no-config")) // "config" == print a configuration file
+ if(::arg()["config"] != "default" && !::arg().mustDo("no-config")) // "config" == print a configuration file
::arg().laxFile(configname.c_str());
::arg().laxParse(argc,argv); // reparse so the commandline still wins
cout<<::arg().configstring(false, true);
} else if (config == "diff") {
cout<<::arg().configstring(true, false);
+ } else if (config == "check") {
+ try {
+ if(!::arg().mustDo("no-config"))
+ ::arg().file(configname.c_str());
+ ::arg().parse(argc,argv);
+ exit(0);
+ }
+ catch(const ArgException &A) {
+ cerr<<"Fatal error: "<<A.reason<<endl;
+ exit(1);
+ }
} else {
cout<<::arg().configstring(true, true);
}