Settings: Default console logging on Android to on

This commit is contained in:
Connor McLaughlin 2021-02-07 03:27:37 +10:00
parent fc578b7ec7
commit a77edc6436
3 changed files with 9 additions and 2 deletions

View File

@ -582,7 +582,7 @@ void HostInterface::SetDefaultSettings(SettingsInterface& si)
si.SetStringValue("Logging", "LogLevel", Settings::GetLogLevelName(Settings::DEFAULT_LOG_LEVEL)); si.SetStringValue("Logging", "LogLevel", Settings::GetLogLevelName(Settings::DEFAULT_LOG_LEVEL));
si.SetStringValue("Logging", "LogFilter", ""); si.SetStringValue("Logging", "LogFilter", "");
si.SetBoolValue("Logging", "LogToConsole", false); si.SetBoolValue("Logging", "LogToConsole", Settings::DEFAULT_LOG_TO_CONSOLE);
si.SetBoolValue("Logging", "LogToDebug", false); si.SetBoolValue("Logging", "LogToDebug", false);
si.SetBoolValue("Logging", "LogToWindow", false); si.SetBoolValue("Logging", "LogToWindow", false);
si.SetBoolValue("Logging", "LogToFile", false); si.SetBoolValue("Logging", "LogToFile", false);

View File

@ -253,7 +253,7 @@ void Settings::Load(SettingsInterface& si)
log_level = ParseLogLevelName(si.GetStringValue("Logging", "LogLevel", GetLogLevelName(DEFAULT_LOG_LEVEL)).c_str()) log_level = ParseLogLevelName(si.GetStringValue("Logging", "LogLevel", GetLogLevelName(DEFAULT_LOG_LEVEL)).c_str())
.value_or(DEFAULT_LOG_LEVEL); .value_or(DEFAULT_LOG_LEVEL);
log_filter = si.GetStringValue("Logging", "LogFilter", ""); log_filter = si.GetStringValue("Logging", "LogFilter", "");
log_to_console = si.GetBoolValue("Logging", "LogToConsole", false); log_to_console = si.GetBoolValue("Logging", "LogToConsole", DEFAULT_LOG_TO_CONSOLE);
log_to_debug = si.GetBoolValue("Logging", "LogToDebug", false); log_to_debug = si.GetBoolValue("Logging", "LogToDebug", false);
log_to_window = si.GetBoolValue("Logging", "LogToWindow", false); log_to_window = si.GetBoolValue("Logging", "LogToWindow", false);
log_to_file = si.GetBoolValue("Logging", "LogToFile", false); log_to_file = si.GetBoolValue("Logging", "LogToFile", false);

View File

@ -357,6 +357,13 @@ struct Settings
static constexpr MemoryCardType DEFAULT_MEMORY_CARD_1_TYPE = MemoryCardType::PerGameTitle; static constexpr MemoryCardType DEFAULT_MEMORY_CARD_1_TYPE = MemoryCardType::PerGameTitle;
static constexpr MemoryCardType DEFAULT_MEMORY_CARD_2_TYPE = MemoryCardType::None; static constexpr MemoryCardType DEFAULT_MEMORY_CARD_2_TYPE = MemoryCardType::None;
static constexpr LOGLEVEL DEFAULT_LOG_LEVEL = LOGLEVEL_INFO; static constexpr LOGLEVEL DEFAULT_LOG_LEVEL = LOGLEVEL_INFO;
// Enable console logging by default on Linux platforms.
#if defined(__linux__) && !defined(__ANDROID__)
static constexpr bool DEFAULT_LOG_TO_CONSOLE = true;
#else
static constexpr bool DEFAULT_LOG_TO_CONSOLE = false;
#endif
}; };
extern Settings g_settings; extern Settings g_settings;