1
0
Fork 0

Options: Only set the logging priority if the command line option is supplied.

This prevents the changing of the logstream priority as set by the test suite
permanently to "alert" during the execution of tests.  Setting a default value
of SG_ALERT is not required as this is the simgear logstream default anyway.
This commit is contained in:
Edward d'Auvergne 2019-11-07 14:50:25 +01:00
parent 0f0361efb8
commit 4105b70f74

View file

@ -2115,7 +2115,10 @@ void Options::init(int argc, char **argv, const SGPath& appDataPath)
// establish log-level before anything else - otherwise it is not possible // establish log-level before anything else - otherwise it is not possible
// to show extra (debug/info/warning) messages for the start-up phase. // to show extra (debug/info/warning) messages for the start-up phase.
fgOptLogLevel(valueForOption("log-level", "alert").c_str()); // Leave the simgear logstream default value of SG_ALERT if the argument is
// not supplied.
if (isOptionSet("log-level"))
fgOptLogLevel(valueForOption("log-level").c_str());
simgear::PathList::const_iterator i; simgear::PathList::const_iterator i;
for (i = p->configFiles.begin(); i != p->configFiles.end(); ++i) { for (i = p->configFiles.begin(); i != p->configFiles.end(); ++i) {