1
0
Fork 0

Adapt logging level for some messages.

Also keep default logging level during very early startup at "alert"
(unless explicitly set on cmd-line).
This commit is contained in:
ThorstenB 2012-05-09 23:47:34 +02:00
parent ec4f2f59c9
commit b91175d47a
2 changed files with 5 additions and 6 deletions

View file

@ -62,7 +62,7 @@ FGLocale::getUserLanguage()
LOCALE_SISO639LANGNAME,
locale, sizeof(locale)))
{
SG_LOG(SG_GENERAL, SG_INFO, "Detected locale's language setting: " << locale);
SG_LOG(SG_GENERAL, SG_DEBUG, "Detected locale's language setting: " << locale);
size_t i = strlen(locale);
locale[i++] = '_';
if (GetLocaleInfo(LOCALE_USER_DEFAULT,
@ -71,11 +71,10 @@ FGLocale::getUserLanguage()
return locale;
locale[--i] = 0;
SG_LOG(SG_GENERAL, SG_INFO, "Failed to detected locale's country setting.");
SG_LOG(SG_GENERAL, SG_WARN, "Failed to detected locale's country setting.");
return locale;
}
SG_LOG(SG_GENERAL, SG_INFO, "Failed to obtain Windows locale information.");
return NULL;
}
#else
@ -104,7 +103,7 @@ FGLocale::findLocaleNode(const string& language)
return node;
}
SG_LOG(SG_GENERAL, SG_INFO, "Searching language resource for locale: " << language);
SG_LOG(SG_GENERAL, SG_DEBUG, "Searching language resource for locale: " << language);
// search locale using full string
vector<SGPropertyNode_ptr> localeList = _intl->getChildren("locale");
@ -149,7 +148,7 @@ FGLocale::selectLanguage(const char *language)
// Use plain C locale if nothing is available.
if ((language == NULL)||(language[0]==0))
{
SG_LOG(SG_GENERAL, SG_INFO, "Unable to detect system language" );
SG_LOG(SG_GENERAL, SG_WARN, "Unable to detect system language" );
language = "C";
}

View file

@ -1735,7 +1735,7 @@ void Options::init(int argc, char **argv, const SGPath& appDataPath)
// establish log-level before anything else - otherwise it is not possible
// to show extra (debug/info/warning) messages for the start-up phase.
fgOptLogLevel(valueForOption("log-level").c_str());
fgOptLogLevel(valueForOption("log-level", "alert").c_str());
// then config files
SGPath config;