refactor: remove remaining vararg log messages (#2776)

This commit is contained in:
Charles Kerr
2022-03-17 17:39:06 -05:00
committed by GitHub
parent 5df252d1e1
commit fa8aaf7631
44 changed files with 500 additions and 666 deletions

View File

@@ -55,8 +55,6 @@ extern "C"
namespace
{
static char constexpr MyName[] = "tr_crypto_utils";
char const* ccrypto_error_to_str(CCCryptorStatus error_code)
{
switch (error_code)
@@ -96,12 +94,15 @@ void log_ccrypto_error(CCCryptorStatus error_code, char const* file, int line)
{
if (tr_logLevelIsActive(TR_LOG_ERROR))
{
auto const errmsg = fmt::format(
_("{crypto_library} error: {error} ({error_code})"),
fmt::arg("crypto_library", "CCrypto"),
fmt::arg("error", ccrypto_error_to_str(error_code)),
fmt::arg("error_code", error_code));
tr_logAddMessage(file, line, TR_LOG_ERROR, MyName, errmsg);
tr_logAddMessage(
file,
line,
TR_LOG_ERROR,
fmt::format(
_("{crypto_library} error: {error} ({error_code})"),
fmt::arg("crypto_library", "CCrypto"),
fmt::arg("error", ccrypto_error_to_str(error_code)),
fmt::arg("error_code", error_code)));
}
}