mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-06 19:33:52 +00:00
Fix issue where new log category settings were getting injected into the database with all settings turned on
This commit is contained in:
parent
cc920e60d9
commit
4e0d85534e
@ -2080,7 +2080,6 @@ void Database::LoadLogSettings(EQEmuLogSys::LogSettings* log_settings) {
|
|||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
|
|
||||||
int log_category_id = 0;
|
int log_category_id = 0;
|
||||||
LogSys.file_logs_enabled = false;
|
|
||||||
|
|
||||||
int categories_in_database[1000] = {};
|
int categories_in_database[1000] = {};
|
||||||
|
|
||||||
@ -2090,9 +2089,9 @@ void Database::LoadLogSettings(EQEmuLogSys::LogSettings* log_settings) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
log_settings[log_category_id].log_to_console = atoi(row[2]);
|
log_settings[log_category_id].log_to_console = static_cast<uint8>(atoi(row[2]));
|
||||||
log_settings[log_category_id].log_to_file = atoi(row[3]);
|
log_settings[log_category_id].log_to_file = static_cast<uint8>(atoi(row[3]));
|
||||||
log_settings[log_category_id].log_to_gmsay = atoi(row[4]);
|
log_settings[log_category_id].log_to_gmsay = static_cast<uint8>(atoi(row[4]));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if any output method is enabled for the category
|
* Determine if any output method is enabled for the category
|
||||||
|
|||||||
@ -113,6 +113,15 @@ void EQEmuLogSys::LoadLogSettingsDefaults()
|
|||||||
*/
|
*/
|
||||||
log_platform = GetExecutablePlatformInt();
|
log_platform = GetExecutablePlatformInt();
|
||||||
|
|
||||||
|
for (int log_category_id = Logs::AA; log_category_id != Logs::MaxCategoryID; log_category_id++) {
|
||||||
|
log_settings[log_category_id].log_to_console = 0;
|
||||||
|
log_settings[log_category_id].log_to_file = 0;
|
||||||
|
log_settings[log_category_id].log_to_gmsay = 0;
|
||||||
|
log_settings[log_category_id].is_category_enabled = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
file_logs_enabled = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Zero out Array
|
* Zero out Array
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user