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

@@ -38,8 +38,6 @@
****
***/
static char constexpr MyName[] = "tr_crypto_utils";
using api_ctr_drbg_context = API(ctr_drbg_context);
using api_sha1_context = API(sha1_context);
using api_dhm_context = API(dhm_context);
@@ -58,12 +56,15 @@ static void log_polarssl_error(int error_code, char const* file, int line)
error_strerror(error_code, error_message, sizeof(error_message));
#endif
auto const errmsg = fmt::format(
_("{crypto_library} error: {error} ({error_code})"),
fmt::arg("crypto_library", "PolarSSL"),
fmt::arg("error", error_message),
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", "PolarSSL"),
fmt::arg("error", error_message),
fmt::arg("error_code", error_code)));
}
}