mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
Some EQEmuLogSys changes regarding class variables
This commit is contained in:
parent
a64c21eb96
commit
ad5d1e4814
@ -82,8 +82,9 @@ EQEmuLogSys::~EQEmuLogSys(){
|
|||||||
|
|
||||||
void EQEmuLogSys::LoadLogSettingsDefaults()
|
void EQEmuLogSys::LoadLogSettingsDefaults()
|
||||||
{
|
{
|
||||||
|
/* Get Executable platform currently running this code (Zone/World/etc) */
|
||||||
log_platform = GetExecutablePlatformInt();
|
log_platform = GetExecutablePlatformInt();
|
||||||
/* Write defaults */
|
/* Zero out Array */
|
||||||
for (int i = 0; i < Logs::LogCategory::MaxCategoryID; i++){
|
for (int i = 0; i < Logs::LogCategory::MaxCategoryID; i++){
|
||||||
log_settings[i].log_to_console = 0;
|
log_settings[i].log_to_console = 0;
|
||||||
log_settings[i].log_to_file = 0;
|
log_settings[i].log_to_file = 0;
|
||||||
@ -96,8 +97,6 @@ void EQEmuLogSys::LoadLogSettingsDefaults()
|
|||||||
log_settings[Logs::UCS_Server].log_to_console = 1;
|
log_settings[Logs::UCS_Server].log_to_console = 1;
|
||||||
log_settings[Logs::Crash].log_to_console = 1;
|
log_settings[Logs::Crash].log_to_console = 1;
|
||||||
log_settings[Logs::MySQLError].log_to_console = 1;
|
log_settings[Logs::MySQLError].log_to_console = 1;
|
||||||
|
|
||||||
log_settings_loaded = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string EQEmuLogSys::FormatOutMessageString(uint16 log_category, std::string in_message){
|
std::string EQEmuLogSys::FormatOutMessageString(uint16 log_category, std::string in_message){
|
||||||
|
|||||||
@ -141,10 +141,11 @@ public:
|
|||||||
|
|
||||||
LogSettings log_settings[Logs::LogCategory::MaxCategoryID];
|
LogSettings log_settings[Logs::LogCategory::MaxCategoryID];
|
||||||
|
|
||||||
bool log_settings_loaded = false;
|
bool file_logs_enabled = false; /* Set when log settings are loaded to determine if keeping a file open is necessary */
|
||||||
bool file_logs_enabled = false;
|
|
||||||
|
|
||||||
int log_platform = 0;
|
int log_platform = 0; /* Sets Executable platform (Zone/World/UCS) etc. */
|
||||||
|
|
||||||
|
std::string process_file_name; /* File name used in writing logs */
|
||||||
|
|
||||||
uint16 GetGMSayColorFromCategory(uint16 log_category);
|
uint16 GetGMSayColorFromCategory(uint16 log_category);
|
||||||
|
|
||||||
|
|||||||
@ -77,15 +77,15 @@ int main() {
|
|||||||
Log.Out(Logs::General, Logs::QS_Server, "Connecting to MySQL...");
|
Log.Out(Logs::General, Logs::QS_Server, "Connecting to MySQL...");
|
||||||
|
|
||||||
/* MySQL Connection */
|
/* MySQL Connection */
|
||||||
if (!database.Connect(
|
// if (!database.Connect(
|
||||||
Config->QSDatabaseHost.c_str(),
|
// Config->QSDatabaseHost.c_str(),
|
||||||
Config->QSDatabaseUsername.c_str(),
|
// Config->QSDatabaseUsername.c_str(),
|
||||||
Config->QSDatabasePassword.c_str(),
|
// Config->QSDatabasePassword.c_str(),
|
||||||
Config->QSDatabaseDB.c_str(),
|
// Config->QSDatabaseDB.c_str(),
|
||||||
Config->QSDatabasePort)) {
|
// Config->QSDatabasePort)) {
|
||||||
Log.Out(Logs::General, Logs::QS_Server, "Cannot continue without a database connection.");
|
// Log.Out(Logs::General, Logs::QS_Server, "Cannot continue without a database connection.");
|
||||||
return 1;
|
// return 1;
|
||||||
}
|
// }
|
||||||
|
|
||||||
/* Register Log System and Settings */
|
/* Register Log System and Settings */
|
||||||
database.LoadLogSysSettings(Log.log_settings);
|
database.LoadLogSysSettings(Log.log_settings);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user