mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-10 08:51:19 +12:00
Migrate force_log_printf to new logging (#714)
This commit is contained in:
parent
072c18a6e3
commit
4be57f4896
108 changed files with 401 additions and 399 deletions
|
@ -339,7 +339,7 @@ namespace iosu
|
|||
}
|
||||
else
|
||||
{
|
||||
forceLog_printf("ACPGetTitleSaveMetaXml(): Meta file \"%s\" does not exist", xmlPath);
|
||||
cemuLog_log(LogType::Force, "ACPGetTitleSaveMetaXml(): Meta file \"{}\" does not exist", xmlPath);
|
||||
memset(acpMetaXml, 0, sizeof(acpMetaXml_t));
|
||||
}
|
||||
return 0;
|
||||
|
@ -373,7 +373,7 @@ namespace iosu
|
|||
free(metaBootMovieData);
|
||||
}
|
||||
else
|
||||
forceLog_printf("ACPGetTitleMetaData(): Unable to load \"%s\"", filePath);
|
||||
cemuLog_log(LogType::Force, "ACPGetTitleMetaData(): Unable to load \"{}\"", filePath);
|
||||
// bootLogoTex.tga
|
||||
sprintf(filePath, "%smeta/bootLogoTex.tga", titlePath);
|
||||
uint32 metaBootLogoSize = 0;
|
||||
|
@ -384,7 +384,7 @@ namespace iosu
|
|||
free(metaBootLogoData);
|
||||
}
|
||||
else
|
||||
forceLog_printf("ACPGetTitleMetaData(): Unable to load \"%s\"", filePath);
|
||||
cemuLog_log(LogType::Force, "ACPGetTitleMetaData(): Unable to load \"{}\"", filePath);
|
||||
|
||||
|
||||
return 0;
|
||||
|
@ -418,7 +418,7 @@ namespace iosu
|
|||
}
|
||||
else
|
||||
{
|
||||
forceLog_printf("ACPGetTitleMetaXml(): Meta file \"%s\" does not exist", filePath);
|
||||
cemuLog_log(LogType::Force, "ACPGetTitleMetaXml(): Meta file \"{}\" does not exist", filePath);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -470,7 +470,7 @@ namespace iosu
|
|||
FSCVirtualFile* fscDirIterator = fsc_openDirIterator(searchPath, &fscStatus);
|
||||
if (fscDirIterator == nullptr)
|
||||
{
|
||||
forceLog_printf("ACPGetTitleSaveDirEx(): Failed to iterate directories in \"%s\"", searchPath);
|
||||
cemuLog_log(LogType::Force, "ACPGetTitleSaveDirEx(): Failed to iterate directories in \"{}\"", searchPath);
|
||||
*countOut = 0;
|
||||
}
|
||||
else
|
||||
|
@ -611,4 +611,4 @@ namespace iosu
|
|||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -322,7 +322,7 @@ namespace iosu
|
|||
forceLogDebug_printf("sslctx_function: adding ca cert: %d", (int)task_settings->settings[location]);
|
||||
if (!iosuCrypto_addCACertificate(sslctx, task_settings->settings[location]))
|
||||
{
|
||||
forceLog_printf("Failed to load CA certificate file");
|
||||
cemuLog_log(LogType::Force, "Failed to load CA certificate file");
|
||||
assert_dbg();
|
||||
}
|
||||
}
|
||||
|
@ -334,13 +334,13 @@ namespace iosu
|
|||
{
|
||||
if (!iosuCrypto_addCACertificate(sslctx, 105))
|
||||
{
|
||||
forceLog_printf("Failed to load certificate file");
|
||||
cemuLog_log(LogType::Force, "Failed to load certificate file");
|
||||
assert_dbg();
|
||||
}
|
||||
|
||||
if (!iosuCrypto_addClientCertificate(sslctx, 3))
|
||||
{
|
||||
forceLog_printf("Failed to load client certificate file");
|
||||
cemuLog_log(LogType::Force, "Failed to load client certificate file");
|
||||
assert_dbg();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -393,24 +393,24 @@ bool iosuCrypto_addClientCertificate(void* sslctx, sint32 certificateId)
|
|||
{
|
||||
if (SSL_CTX_use_certificate(ctx, iosuCryptoCertificates.certList[i].cert) != 1)
|
||||
{
|
||||
forceLog_printf("Unable to setup certificate %d", certificateId);
|
||||
cemuLog_log(LogType::Force, "Unable to setup certificate {}", certificateId);
|
||||
return false;
|
||||
}
|
||||
if (SSL_CTX_use_RSAPrivateKey(ctx, iosuCryptoCertificates.certList[i].pkey) != 1)
|
||||
{
|
||||
forceLog_printf("Unable to setup certificate %d RSA private key", certificateId);
|
||||
cemuLog_log(LogType::Force, "Unable to setup certificate {} RSA private key", certificateId);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (SSL_CTX_check_private_key(ctx) == false)
|
||||
{
|
||||
forceLog_printf("Certificate private key could not be validated (verify required files for online mode or disable online mode)");
|
||||
cemuLog_log(LogType::Force, "Certificate private key could not be validated (verify required files for online mode or disable online mode)");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
forceLog_printf("Certificate not found (verify required files for online mode or disable online mode)");
|
||||
cemuLog_log(LogType::Force, "Certificate not found (verify required files for online mode or disable online mode)");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -438,7 +438,7 @@ bool iosuCrypto_addCustomCACertificate(void* sslctx, uint8* certData, sint32 cer
|
|||
X509* cert = d2i_X509(NULL, (const unsigned char**)&tempPtr, certLength);
|
||||
if (cert == nullptr)
|
||||
{
|
||||
forceLog_printf("Invalid custom server PKI certificate");
|
||||
cemuLog_log(LogType::Force, "Invalid custom server PKI certificate");
|
||||
return false;
|
||||
}
|
||||
X509_STORE_add_cert(store, cert);
|
||||
|
@ -571,7 +571,7 @@ void iosuCrypto_init()
|
|||
// verify if OTP is ok
|
||||
if (length != 1024) // todo - should also check some fixed values to verify integrity of otp dump
|
||||
{
|
||||
forceLog_printf("IOSU_CRYPTO: otp.bin has wrong size (must be 1024 bytes)");
|
||||
cemuLog_log(LogType::Force, "IOSU_CRYPTO: otp.bin has wrong size (must be 1024 bytes)");
|
||||
hasOtpMem = false;
|
||||
}
|
||||
else
|
||||
|
@ -582,7 +582,7 @@ void iosuCrypto_init()
|
|||
}
|
||||
else
|
||||
{
|
||||
forceLog_printf("IOSU_CRYPTO: No otp.bin found. Online mode cannot be used");
|
||||
cemuLog_log(LogType::Force, "IOSU_CRYPTO: No otp.bin found. Online mode cannot be used");
|
||||
hasOtpMem = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ namespace iosu
|
|||
inet_pton(AF_INET, nexTokenResult.nexToken.host, &hostIp);
|
||||
g_fpd.nexFriendSession = new NexFriends(hostIp, nexTokenResult.nexToken.port, "ridfebb9", myPid, nexTokenResult.nexToken.nexPassword, nexTokenResult.nexToken.token, accountId, (uint8*)&miiData, (wchar_t*)screenName, (uint8)countryCode, g_fpd.myPresence);
|
||||
g_fpd.nexFriendSession->setNotificationHandler(notificationHandler);
|
||||
forceLog_printf("IOSU_FPD: Created friend server session");
|
||||
cemuLog_log(LogType::Force, "IOSU_FPD: Created friend server session");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1047,4 +1047,4 @@ namespace iosu
|
|||
g_fpd.isThreadStarted = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ namespace iosu
|
|||
uint32be titleCountBE = titleCount;
|
||||
if (mcpGetTitleList(titleList, titleCount * sizeof(MCPTitleInfo), &titleCountBE) != 0)
|
||||
{
|
||||
forceLog_printf("IOSU: nim failed to acquire title list");
|
||||
cemuLog_log(LogType::Force, "IOSU: nim failed to acquire title list");
|
||||
free(titleList);
|
||||
return;
|
||||
}
|
||||
|
@ -218,7 +218,7 @@ namespace iosu
|
|||
if (!result)
|
||||
{
|
||||
memset(idbeIconOutput, 0, sizeof(NAPI::IDBEIconDataV0));
|
||||
forceLog_printf("NIM: Unable to download IDBE icon");
|
||||
cemuLog_log(LogType::Force, "NIM: Unable to download IDBE icon");
|
||||
return 0;
|
||||
}
|
||||
// add new cache entry
|
||||
|
@ -249,7 +249,7 @@ namespace iosu
|
|||
{
|
||||
if (g_nim.backgroundThreadStarted == false)
|
||||
{
|
||||
forceLog_printf("IOSU: Starting nim background thread");
|
||||
cemuLog_log(LogType::Force, "IOSU: Starting nim background thread");
|
||||
std::thread t(nim_backgroundThread);
|
||||
t.detach();
|
||||
g_nim.backgroundThreadStarted = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue