Partition, ...: use libfmt for logging

This commit is contained in:
Max Kellermann
2021-06-24 20:22:48 +02:00
parent 0185d58a2b
commit 6f539cfcd6
44 changed files with 320 additions and 296 deletions

View File

@@ -20,6 +20,7 @@
#include "config.h"
#include "MikmodDecoderPlugin.hxx"
#include "../DecoderAPI.hxx"
#include "lib/fmt/PathFormatter.hxx"
#include "tag/Handler.hxx"
#include "fs/Path.hxx"
#include "util/Domain.hxx"
@@ -126,9 +127,9 @@ mikmod_decoder_init(const ConfigBlock &block)
DMODE_16BITS);
if (MikMod_Init(params)) {
FormatError(mikmod_domain,
"Could not init MikMod: %s",
MikMod_strerror(MikMod_errno));
FmtError(mikmod_domain,
"Could not init MikMod: {}",
MikMod_strerror(MikMod_errno));
return false;
}
@@ -155,8 +156,7 @@ mikmod_decoder_file_decode(DecoderClient &client, Path path_fs)
handle = Player_Load(path2, 128, 0);
if (handle == nullptr) {
FormatError(mikmod_domain,
"failed to open mod: %s", path_fs.c_str());
FmtError(mikmod_domain, "failed to open mod: {}", path_fs);
return;
}
@@ -189,8 +189,7 @@ mikmod_decoder_scan_file(Path path_fs, TagHandler &handler) noexcept
MODULE *handle = Player_Load(path2, 128, 0);
if (handle == nullptr) {
FormatDebug(mikmod_domain,
"Failed to open file: %s", path_fs.c_str());
FmtDebug(mikmod_domain, "Failed to open file: {}", path_fs);
return false;
}