mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 19:35:42 +00:00
refactor(Core/Logging): switch to fmt style for LOG_ (#10366)
* feat(Core/Common): add support fmt style for ASSERT and ABORT * correct CheckCompactArrayMaskOverflow * 1 * Update src/server/game/Spells/Spell.cpp * rework logging * add fmt replace logs * logging * FMT_LOG_ * settings * fix startup * 1 * 2 * 3 * 4 * 5 * fmt::print * to fmt
This commit is contained in:
@@ -35,18 +35,18 @@ void ACSoapThread(const std::string& host, uint16 port)
|
||||
|
||||
if (!soap_valid_socket(soap_bind(&soap, host.c_str(), port, 100)))
|
||||
{
|
||||
LOG_ERROR("network.soap", "ACSoap: couldn't bind to %s:%d", host.c_str(), port);
|
||||
LOG_ERROR("network.soap", "ACSoap: couldn't bind to {}:{}", host, port);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
LOG_INFO("network.soap", "ACSoap: bound to http://%s:%d", host.c_str(), port);
|
||||
LOG_INFO("network.soap", "ACSoap: bound to http://{}:{}", host, port);
|
||||
|
||||
while (!World::IsStopped())
|
||||
{
|
||||
if (!soap_valid_socket(soap_accept(&soap)))
|
||||
continue; // ran into an accept timeout
|
||||
|
||||
LOG_DEBUG("network.soap", "ACSoap: accepted connection from IP=%d.%d.%d.%d", (int)(soap.ip >> 24) & 0xFF, (int)(soap.ip >> 16) & 0xFF, (int)(soap.ip >> 8) & 0xFF, (int)soap.ip & 0xFF);
|
||||
LOG_DEBUG("network.soap", "ACSoap: accepted connection from IP={}.{}.{}.{}", (int)(soap.ip >> 24) & 0xFF, (int)(soap.ip >> 16) & 0xFF, (int)(soap.ip >> 8) & 0xFF, (int)soap.ip & 0xFF);
|
||||
struct soap* thread_soap = soap_copy(&soap);// make a safe copy
|
||||
|
||||
process_message(thread_soap);
|
||||
@@ -83,26 +83,26 @@ int ns1__executeCommand(soap* soap, char* command, char** result)
|
||||
uint32 accountId = AccountMgr::GetId(soap->userid);
|
||||
if (!accountId)
|
||||
{
|
||||
LOG_DEBUG("network", "ACSoap: Client used invalid username '%s'", soap->userid);
|
||||
LOG_DEBUG("network", "ACSoap: Client used invalid username '{}'", soap->userid);
|
||||
return 401;
|
||||
}
|
||||
|
||||
if (!AccountMgr::CheckPassword(accountId, soap->passwd))
|
||||
{
|
||||
LOG_DEBUG("network.soap", "ACSoap: invalid password for account '%s'", soap->userid);
|
||||
LOG_DEBUG("network.soap", "ACSoap: invalid password for account '{}'", soap->userid);
|
||||
return 401;
|
||||
}
|
||||
|
||||
if (AccountMgr::GetSecurity(accountId) < SEC_ADMINISTRATOR)
|
||||
{
|
||||
LOG_DEBUG("network.soap", "ACSoap: %s's gmlevel is too low", soap->userid);
|
||||
LOG_DEBUG("network.soap", "ACSoap: {}'s gmlevel is too low", soap->userid);
|
||||
return 403;
|
||||
}
|
||||
|
||||
if (!command || !*command)
|
||||
return soap_sender_fault(soap, "Command can not be empty", "The supplied command was an empty string");
|
||||
|
||||
LOG_DEBUG("network.soap", "ACSoap: got command '%s'", command);
|
||||
LOG_DEBUG("network.soap", "ACSoap: got command '{}'", command);
|
||||
SOAPCommand connection;
|
||||
|
||||
// commands are executed in the world thread. We have to wait for them to be completed
|
||||
|
||||
Reference in New Issue
Block a user