mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 18:10:26 +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:
@@ -44,15 +44,15 @@ void SetProcessPriority(std::string const& logChannel, uint32 affinity, bool hig
|
||||
|
||||
if (!currentAffinity)
|
||||
{
|
||||
LOG_ERROR(logChannel, "Processors marked in UseProcessors bitmask (hex) %x are not accessible. Accessible processors bitmask (hex): %x", affinity, appAff);
|
||||
LOG_ERROR(logChannel, "Processors marked in UseProcessors bitmask (hex) {:x} are not accessible. Accessible processors bitmask (hex): {:x}", affinity, appAff);
|
||||
}
|
||||
else if (SetProcessAffinityMask(hProcess, currentAffinity))
|
||||
{
|
||||
LOG_INFO(logChannel, "Using processors (bitmask, hex): %x", currentAffinity);
|
||||
LOG_INFO(logChannel, "Using processors (bitmask, hex): {:x}", currentAffinity);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_ERROR(logChannel, "Can't set used processors (hex): %x", currentAffinity);
|
||||
LOG_ERROR(logChannel, "Can't set used processors (hex): {:x}", currentAffinity);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -84,13 +84,13 @@ void SetProcessPriority(std::string const& logChannel, uint32 affinity, bool hig
|
||||
|
||||
if (sched_setaffinity(0, sizeof(mask), &mask))
|
||||
{
|
||||
LOG_ERROR(logChannel, "Can't set used processors (hex): %x, error: %s", affinity, strerror(errno));
|
||||
LOG_ERROR(logChannel, "Can't set used processors (hex): {:x}, error: {}", affinity, strerror(errno));
|
||||
}
|
||||
else
|
||||
{
|
||||
CPU_ZERO(&mask);
|
||||
sched_getaffinity(0, sizeof(mask), &mask);
|
||||
LOG_INFO(logChannel, "Using processors (bitmask, hex): %lx", *(__cpu_mask*)(&mask));
|
||||
LOG_INFO(logChannel, "Using processors (bitmask, hex): {:x}", *(__cpu_mask*)(&mask));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,11 +98,11 @@ void SetProcessPriority(std::string const& logChannel, uint32 affinity, bool hig
|
||||
{
|
||||
if (setpriority(PRIO_PROCESS, 0, PROCESS_HIGH_PRIORITY))
|
||||
{
|
||||
LOG_ERROR(logChannel, "Can't set process priority class, error: %s", strerror(errno));
|
||||
LOG_ERROR(logChannel, "Can't set process priority class, error: {}", strerror(errno));
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_INFO(logChannel, "Process priority class set to %i", getpriority(PRIO_PROCESS, 0));
|
||||
LOG_INFO(logChannel, "Process priority class set to {}", getpriority(PRIO_PROCESS, 0));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user