Common: Migrate logging to fmt

Continues the migration of our code over to the fmt logger.
This commit is contained in:
Lioncash
2020-10-23 14:41:30 -04:00
parent 4f5c8bb42a
commit 4e8df93f41
18 changed files with 154 additions and 152 deletions

View File

@ -60,7 +60,7 @@ static int AshmemCreateFileMapping(const char* name, size_t size)
if (ret < 0)
{
close(fd);
NOTICE_LOG(MEMMAP, "Ashmem returned error: 0x%08x", ret);
NOTICE_LOG_FMT(MEMMAP, "Ashmem returned error: {:#010x}", ret);
return ret;
}
return fd;
@ -77,7 +77,7 @@ void MemArena::GrabSHMSegment(size_t size)
fd = AshmemCreateFileMapping(("dolphin-emu." + std::to_string(getpid())).c_str(), size);
if (fd < 0)
{
NOTICE_LOG(MEMMAP, "Ashmem allocation failed");
NOTICE_LOG_FMT(MEMMAP, "Ashmem allocation failed");
return;
}
#else
@ -85,12 +85,12 @@ void MemArena::GrabSHMSegment(size_t size)
fd = shm_open(file_name.c_str(), O_RDWR | O_CREAT | O_EXCL, 0600);
if (fd == -1)
{
ERROR_LOG(MEMMAP, "shm_open failed: %s", strerror(errno));
ERROR_LOG_FMT(MEMMAP, "shm_open failed: {}", strerror(errno));
return;
}
shm_unlink(file_name.c_str());
if (ftruncate(fd, size) < 0)
ERROR_LOG(MEMMAP, "Failed to allocate low memory space");
ERROR_LOG_FMT(MEMMAP, "Failed to allocate low memory space");
#endif
}
@ -114,7 +114,7 @@ void* MemArena::CreateView(s64 offset, size_t size, void* base)
if (retval == MAP_FAILED)
{
NOTICE_LOG(MEMMAP, "mmap failed");
NOTICE_LOG_FMT(MEMMAP, "mmap failed");
return nullptr;
}
else