mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-31 17:43:47 +00:00
feat(Core/Logging): rework logging (#4692)
* feat(Core/Logging): rework logging * correct level for sql.sql * del unused config options * Correct build * correct after merge * whitespace 20:29:37 1. 'Player.cpp'. Replace (1) 20:29:37 2. 'ObjectMgr.cpp'. Replace (3) * 1 * correct logging * correct affter merge * 1 * 2 * LOG_LEVEL_WARN * #include "AppenderDB.h" * 3 * 4 * 5 * 1. 'WorldSocket.cpp'. Replace (1) * 6 * 1
This commit is contained in:
@@ -17,7 +17,7 @@ void CharacterDatabaseCleaner::CleanDatabase()
|
||||
if (!sWorld->getBoolConfig(CONFIG_CLEAN_CHARACTER_DB))
|
||||
return;
|
||||
|
||||
sLog->outString("Cleaning character database...");
|
||||
LOG_INFO("server", "Cleaning character database...");
|
||||
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -51,8 +51,8 @@ void CharacterDatabaseCleaner::CleanDatabase()
|
||||
|
||||
sWorld->SetCleaningFlags(flags);
|
||||
|
||||
sLog->outString(">> Cleaned character database in %u ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Cleaned character database in %u ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
}
|
||||
|
||||
void CharacterDatabaseCleaner::CheckUnique(const char* column, const char* table, bool (*check)(uint32))
|
||||
@@ -60,7 +60,7 @@ void CharacterDatabaseCleaner::CheckUnique(const char* column, const char* table
|
||||
QueryResult result = CharacterDatabase.PQuery("SELECT DISTINCT %s FROM %s", column, table);
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString("Table %s is empty.", table);
|
||||
LOG_INFO("server", "Table %s is empty.", table);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -328,7 +328,7 @@ bool PlayerDumpWriter::DumpTable(std::string& dump, uint32 guid, char const* tab
|
||||
case DTT_CHARACTER:
|
||||
{
|
||||
if (result->GetFieldCount() <= 74) // avoid crashes on next check
|
||||
sLog->outCrash("PlayerDumpWriter::DumpTable - Trying to access non-existing or wrong positioned field (`deleteInfos_Account`) in `characters` table.");
|
||||
LOG_FATAL("server", "PlayerDumpWriter::DumpTable - Trying to access non-existing or wrong positioned field (`deleteInfos_Account`) in `characters` table.");
|
||||
|
||||
if (result->Fetch()[74].GetUInt32()) // characters.deleteInfos_Account - if filled error
|
||||
return false;
|
||||
@@ -503,7 +503,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
|
||||
std::string tn = gettablename(line);
|
||||
if (tn.empty())
|
||||
{
|
||||
sLog->outError("LoadPlayerDump: Can't extract table name from line: '%s'!", line.c_str());
|
||||
LOG_ERROR("server", "LoadPlayerDump: Can't extract table name from line: '%s'!", line.c_str());
|
||||
ROLLBACK(DUMP_FILE_BROKEN);
|
||||
}
|
||||
|
||||
@@ -520,7 +520,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
|
||||
|
||||
if (i == DUMP_TABLE_COUNT)
|
||||
{
|
||||
sLog->outError("LoadPlayerDump: Unknown table: '%s'!", tn.c_str());
|
||||
LOG_ERROR("server", "LoadPlayerDump: Unknown table: '%s'!", tn.c_str());
|
||||
ROLLBACK(DUMP_FILE_BROKEN);
|
||||
}
|
||||
|
||||
@@ -670,7 +670,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
|
||||
break;
|
||||
}
|
||||
default:
|
||||
sLog->outError("Unknown dump table type: %u", type);
|
||||
LOG_ERROR("server", "Unknown dump table type: %u", type);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user