aboutsummaryrefslogtreecommitdiff
path: root/src/common/Threading/ProcessPriority.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/Threading/ProcessPriority.cpp')
-rw-r--r--src/common/Threading/ProcessPriority.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/common/Threading/ProcessPriority.cpp b/src/common/Threading/ProcessPriority.cpp
index aafc1c49b04..135c6396d67 100644
--- a/src/common/Threading/ProcessPriority.cpp
+++ b/src/common/Threading/ProcessPriority.cpp
@@ -44,11 +44,11 @@ void SetProcessPriority(std::string const& logChannel, uint32 affinity, bool hig
ULONG_PTR currentAffinity = affinity & appAff;
if (!currentAffinity)
- TC_LOG_ERROR(logChannel, "Processors marked in UseProcessors bitmask (hex) %x are not accessible. Accessible processors bitmask (hex): %x", affinity, appAff);
+ TC_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))
- TC_LOG_INFO(logChannel, "Using processors (bitmask, hex): %x", currentAffinity);
+ TC_LOG_INFO(logChannel, "Using processors (bitmask, hex): {:x}", currentAffinity);
else
- TC_LOG_ERROR(logChannel, "Can't set used processors (hex): %x", currentAffinity);
+ TC_LOG_ERROR(logChannel, "Can't set used processors (hex): {:x}", currentAffinity);
}
}
@@ -72,21 +72,21 @@ void SetProcessPriority(std::string const& logChannel, uint32 affinity, bool hig
CPU_SET(i, &mask);
if (sched_setaffinity(0, sizeof(mask), &mask))
- TC_LOG_ERROR(logChannel, "Can't set used processors (hex): %x, error: %s", affinity, strerror(errno));
+ TC_LOG_ERROR(logChannel, "Can't set used processors (hex): {:x}, error: {}", affinity, strerror(errno));
else
{
CPU_ZERO(&mask);
sched_getaffinity(0, sizeof(mask), &mask);
- TC_LOG_INFO(logChannel, "Using processors (bitmask, hex): %lx", *(__cpu_mask*)(&mask));
+ TC_LOG_INFO(logChannel, "Using processors (bitmask, hex): {:x}", *(__cpu_mask*)(&mask));
}
}
if (highPriority)
{
if (setpriority(PRIO_PROCESS, 0, PROCESS_HIGH_PRIORITY))
- TC_LOG_ERROR(logChannel, "Can't set process priority class, error: %s", strerror(errno));
+ TC_LOG_ERROR(logChannel, "Can't set process priority class, error: {}", strerror(errno));
else
- TC_LOG_INFO(logChannel, "Process priority class set to %i", getpriority(PRIO_PROCESS, 0));
+ TC_LOG_INFO(logChannel, "Process priority class set to {}", getpriority(PRIO_PROCESS, 0));
}
#else