mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-10 00:41:19 +12:00
Logging migration (forceLogDebug_printf) (#780)
* script changes - no arguments * script changes with 2 arguments * script changes with > 2 arguments * script conversions with 1 argument - pt. 1 * script conversions with 1 argument - pt. 2 * script conversions with 1 argument - pt. 3 * script conversions with 1 argument - pt. 4 * script conversions with 1 argument - pt. 5 Pointer format hunting * Fixed pointer format * script conversions with 1 argument - final * fixed conversion in non utf-8 file * fixed conversion with capital letter * actually fixed conversion with capital letter * fixed another capital lettering issue * Added conversions with LR removed * removed LR from logs * Converted logs that previously contained LR * converted log that originally specified string length * fixed log with commas in main text * fixed multi-line log * Fixed more logs with commas in main text * Fixed unformatted pointer * added conversion with float value * converted lines with double parameters * converted missed line * corrected argument formatting Co-authored-by: Crementif <26669564+Crementif@users.noreply.github.com> * Fixed misspellings of "unhandled" unhandeled -> unhandled Co-authored-by: Crementif <26669564+Crementif@users.noreply.github.com> --------- Co-authored-by: Crementif <26669564+Crementif@users.noreply.github.com>
This commit is contained in:
parent
f48ad6a1ca
commit
caa57a3cfd
98 changed files with 469 additions and 469 deletions
|
@ -317,7 +317,7 @@ namespace iosu
|
|||
FSCVirtualFile* fscFile = sFileHandleTable.GetByHandle(fileHandle);
|
||||
if (!fscFile)
|
||||
{
|
||||
forceLogDebug_printf("__FSACloseFile(): Invalid handle (0x%08x)", fileHandle);
|
||||
cemuLog_logDebug(LogType::Force, "__FSACloseFile(): Invalid handle (0x{:08x})", fileHandle);
|
||||
return (FSStatus)FS_RESULT::ERR_PLACEHOLDER;
|
||||
}
|
||||
// unregister file
|
||||
|
@ -587,7 +587,7 @@ namespace iosu
|
|||
FSCVirtualFile* fscFile = sDirHandleTable.GetByHandle((sint32)cmd->cmdReadDir.dirHandle);
|
||||
if (!fscFile)
|
||||
{
|
||||
forceLogDebug_printf("CloseDir: Invalid handle (0x%08x)", (sint32)cmd->cmdReadDir.dirHandle);
|
||||
cemuLog_logDebug(LogType::Force, "CloseDir: Invalid handle (0x{:08x})", (sint32)cmd->cmdReadDir.dirHandle);
|
||||
return (FSStatus)FS_RESULT::ERR_PLACEHOLDER;
|
||||
}
|
||||
sDirHandleTable.ReleaseHandle(cmd->cmdReadDir.dirHandle);
|
||||
|
|
|
@ -309,7 +309,7 @@ namespace iosu
|
|||
}
|
||||
else
|
||||
{
|
||||
forceLogDebug_printf("ACPGetSaveDataTitleIdList(): Missing meta.xml for save %08x-%08x", titleIdHigh, titleIdLow);
|
||||
cemuLog_logDebug(LogType::Force, "ACPGetSaveDataTitleIdList(): Missing meta.xml for save {:08x}-{:08x}", titleIdHigh, titleIdLow);
|
||||
}
|
||||
}
|
||||
fsc_close(fscDirIteratorTitleIdLow);
|
||||
|
|
|
@ -595,7 +595,7 @@ int iosuAct_thread()
|
|||
}
|
||||
else
|
||||
{
|
||||
forceLogDebug_printf("Gen UUID unknown mode %d", actCemuRequest->uuidName);
|
||||
cemuLog_logDebug(LogType::Force, "Gen UUID unknown mode {}", actCemuRequest->uuidName);
|
||||
}
|
||||
actCemuRequest->setACTReturnCode(0);
|
||||
}
|
||||
|
|
|
@ -239,7 +239,7 @@ namespace iosu
|
|||
// task->result_buffer.resize(task->result_buffer.size() + writeByteSize);
|
||||
//writeByteSize = min(writeByteSize, task->result_buffer.capacity() - task->processed_length);
|
||||
|
||||
//forceLogDebug_printf("task_write_callback: %d (processed: %d)", writeByteSize, task->processed_length);
|
||||
//cemuLog_logDebug(LogType::Force, "task_write_callback: {} (processed: {})", writeByteSize, task->processed_length);
|
||||
if (writeByteSize > 0)
|
||||
{
|
||||
//memcpy(task->result_buffer.data() + task->processed_length, ptr, writeByteSize);
|
||||
|
@ -252,7 +252,7 @@ namespace iosu
|
|||
|
||||
size_t task_download_header_callback(char* ptr, size_t size, size_t nitems, void* userdata)
|
||||
{
|
||||
//forceLogDebug_printf("\tHeader: %s", ptr);
|
||||
//cemuLog_logDebug(LogType::Force, "\tHeader: {}", ptr);
|
||||
|
||||
return size * nitems;
|
||||
}
|
||||
|
@ -292,7 +292,7 @@ namespace iosu
|
|||
task->content_type = ContentType::kText;
|
||||
else
|
||||
{
|
||||
forceLogDebug_printf("task_header_callback: unknown content type > %s", type);
|
||||
cemuLog_logDebug(LogType::Force, "task_header_callback: unknown content type > {}", type);
|
||||
}
|
||||
}
|
||||
else if (starts_with(ptr, "Last-Modified: "))
|
||||
|
@ -300,8 +300,8 @@ namespace iosu
|
|||
// TODO timestamp (?)
|
||||
}
|
||||
|
||||
//forceLogDebug_printf("task_header_callback: len %d (%d) and type %d", task->content_length, task->result_buffer.capacity(), task->content_type);
|
||||
//forceLogDebug_printf("\t%s", ptr);
|
||||
//cemuLog_logDebug(LogType::Force, "task_header_callback: len {} ({}) and type {}", task->content_length, task->result_buffer.capacity(), task->content_type);
|
||||
//cemuLog_logDebug(LogType::Force, "\t{}", ptr);
|
||||
return size * nitems;
|
||||
}
|
||||
|
||||
|
@ -310,7 +310,7 @@ namespace iosu
|
|||
auto task_settings = (TaskSetting*)param;
|
||||
if (task_settings->taskType == kRawDlTaskSetting)
|
||||
{
|
||||
forceLogDebug_printf("sslctx_function: adding client cert: %d", (int)task_settings->settings[TaskSetting::kClientCert]);
|
||||
cemuLog_logDebug(LogType::Force, "sslctx_function: adding client cert: {}", (int)task_settings->settings[TaskSetting::kClientCert]);
|
||||
if (!iosuCrypto_addClientCertificate(sslctx, task_settings->settings[TaskSetting::kClientCert]))
|
||||
assert_dbg();
|
||||
|
||||
|
@ -319,7 +319,7 @@ namespace iosu
|
|||
{
|
||||
if (task_settings->settings[location] != 0)
|
||||
{
|
||||
forceLogDebug_printf("sslctx_function: adding ca cert: %d", (int)task_settings->settings[location]);
|
||||
cemuLog_logDebug(LogType::Force, "sslctx_function: adding ca cert: {}", (int)task_settings->settings[location]);
|
||||
if (!iosuCrypto_addCACertificate(sslctx, task_settings->settings[location]))
|
||||
{
|
||||
cemuLog_log(LogType::Force, "Failed to load CA certificate file");
|
||||
|
@ -457,7 +457,7 @@ namespace iosu
|
|||
it->wait_state = TRUE;
|
||||
return BUILD_NN_RESULT(NN_RESULT_LEVEL_SUCCESS, NN_RESULT_MODULE_NN_BOSS, 0);
|
||||
}
|
||||
forceLogDebug_printf("task run state: %d | exec: %d (tasks: %d)", it->turn_state, it->exec_count, g_boss.tasks.size());
|
||||
cemuLog_logDebug(LogType::Force, "task run state: {} | exec: {} (tasks: {})", it->turn_state, it->exec_count, g_boss.tasks.size());
|
||||
it->turn_state = kRunning;
|
||||
it->exec_count++;
|
||||
|
||||
|
@ -601,25 +601,25 @@ namespace iosu
|
|||
if (curl_result != CURLE_OK)
|
||||
{
|
||||
#ifdef CEMU_DEBUG_ASSERT
|
||||
forceLogDebug_printf("curl error buff: %s", errbuf);
|
||||
cemuLog_logDebug(LogType::Force, "curl error buff: {}", errbuf);
|
||||
#endif
|
||||
it->turn_state = kError;
|
||||
it->wait_state = TRUE;
|
||||
forceLogDebug_printf("task_run curl fail: %d", curl_result);
|
||||
cemuLog_logDebug(LogType::Force, "task_run curl fail: {}", curl_result);
|
||||
return BUILD_NN_RESULT(NN_RESULT_LEVEL_FATAL, NN_RESULT_MODULE_NN_BOSS, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (it->http_status_code != 200)
|
||||
{
|
||||
forceLogDebug_printf("BOSS task_run: Received unexpected HTTP response code");
|
||||
cemuLog_logDebug(LogType::Force, "BOSS task_run: Received unexpected HTTP response code");
|
||||
}
|
||||
if (it->http_status_code == 404)
|
||||
{
|
||||
// todo - is this correct behavior?
|
||||
it->turn_state = kError;
|
||||
it->wait_state = TRUE;
|
||||
forceLogDebug_printf("task_run failed due to 404 error");
|
||||
cemuLog_logDebug(LogType::Force, "task_run failed due to 404 error");
|
||||
return BUILD_NN_RESULT(NN_RESULT_LEVEL_FATAL, NN_RESULT_MODULE_NN_BOSS, 0);
|
||||
}
|
||||
}
|
||||
|
@ -633,7 +633,7 @@ namespace iosu
|
|||
|
||||
break;
|
||||
case ContentType::kText:
|
||||
forceLogDebug_printf("task_run returns text: %.*s", it->content_length, it->result_buffer.data());
|
||||
cemuLog_logDebug(LogType::Force, "task_run returns text: {}", fmt::ptr(it->result_buffer.data()));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -653,7 +653,7 @@ namespace iosu
|
|||
|
||||
char targetFileName[TaskSetting::kFileNameLen + 1]{};
|
||||
strncpy(targetFileName, (char*)&it->task_settings.settings[TaskSetting::kNbdlFileName], TaskSetting::kFileNameLen);
|
||||
forceLogDebug_printf("\tnbdl task target filename: \"%s\"", targetFileName);
|
||||
cemuLog_logDebug(LogType::Force, "\tnbdl task target filename: \"{}\"", targetFileName);
|
||||
const bool hasFileName = targetFileName[0] != '\0';
|
||||
|
||||
while (!it->queued_files.empty())
|
||||
|
@ -704,7 +704,7 @@ namespace iosu
|
|||
curl_result = curl_easy_perform(curl);
|
||||
if (curl_result != CURLE_OK)
|
||||
{
|
||||
forceLogDebug_printf("task_run curl failed on file download (%d): %s > %s", curl_result, file.file_name.c_str(), file.url.c_str());
|
||||
cemuLog_logDebug(LogType::Force, "task_run curl failed on file download ({}): {} > {}", curl_result, file.file_name, file.url);
|
||||
if (hasFileName)
|
||||
{
|
||||
turnstate = kError;
|
||||
|
@ -727,7 +727,7 @@ namespace iosu
|
|||
|
||||
if(it->processed_file_size != file.size)
|
||||
{
|
||||
forceLogDebug_printf("task_run file download size mismatch: %s > %s > %d from %d bytes", file.file_name.c_str(), file.url.c_str(), it->processed_file_size, file.size);
|
||||
cemuLog_logDebug(LogType::Force, "task_run file download size mismatch: {} > {} > {} from {} bytes", file.file_name, file.url, it->processed_file_size, file.size);
|
||||
if (hasFileName)
|
||||
{
|
||||
turnstate = kError;
|
||||
|
@ -796,7 +796,7 @@ namespace iosu
|
|||
}
|
||||
catch (const std::exception& ex)
|
||||
{
|
||||
forceLogDebug_printf("file error: %s", ex.what());
|
||||
cemuLog_logDebug(LogType::Force, "file error: {}", ex.what());
|
||||
}
|
||||
|
||||
if (hasFileName)
|
||||
|
@ -805,7 +805,7 @@ namespace iosu
|
|||
}
|
||||
catch (const std::exception& ex)
|
||||
{
|
||||
forceLogDebug_printf("dir error: %s", ex.what());
|
||||
cemuLog_logDebug(LogType::Force, "dir error: {}", ex.what());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -865,7 +865,7 @@ namespace iosu
|
|||
{
|
||||
if (timeout != 0 && (uint32)std::chrono::duration_cast<std::chrono::seconds>(tick_cached() - start).count() >= timeout)
|
||||
{
|
||||
forceLogDebug_printf("task_wait: timeout reached -> %d seconds passed", timeout);
|
||||
cemuLog_logDebug(LogType::Force, "task_wait: timeout reached -> {} seconds passed", timeout);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace iosu
|
|||
|
||||
void notificationHandler(NexFriends::NOTIFICATION_TYPE type, uint32 pid)
|
||||
{
|
||||
forceLogDebug_printf("Friends::Notification %02x pid %08x", type, pid);
|
||||
cemuLog_logDebug(LogType::Force, "Friends::Notification {:02x} pid {:08x}", type, pid);
|
||||
if(GetConfig().notification.friends)
|
||||
{
|
||||
std::unique_lock lock(g_friend_notification_mutex);
|
||||
|
@ -174,7 +174,7 @@ namespace iosu
|
|||
}
|
||||
else
|
||||
{
|
||||
forceLogDebug_printf("IOSU_FPD: Failed to acquire nex token for friend server");
|
||||
cemuLog_logDebug(LogType::Force, "IOSU_FPD: Failed to acquire nex token for friend server");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -542,7 +542,7 @@ namespace iosu
|
|||
uint64 mid = _swapEndianU64(fpdCemuRequest->markFriendRequest.messageIdList.GetPtr()[i]);
|
||||
if (mid == 0)
|
||||
{
|
||||
forceLogDebug_printf("MarkFriendRequestAsReceivedAsync - Invalid messageId");
|
||||
cemuLog_logDebug(LogType::Force, "MarkFriendRequestAsReceivedAsync - Invalid messageId");
|
||||
continue;
|
||||
}
|
||||
messageIds[count] = mid;
|
||||
|
|
|
@ -17,7 +17,7 @@ sint32 iosuIoctl_pushAndWait(uint32 ioctlHandle, ioQueueEntry_t* ioQueueEntry)
|
|||
{
|
||||
if (ioctlHandle != IOS_DEVICE_ACT && ioctlHandle != IOS_DEVICE_ACP_MAIN && ioctlHandle != IOS_DEVICE_MCP && ioctlHandle != IOS_DEVICE_BOSS && ioctlHandle != IOS_DEVICE_NIM && ioctlHandle != IOS_DEVICE_FPD)
|
||||
{
|
||||
forceLogDebug_printf("Unsupported IOSU device %d", ioctlHandle);
|
||||
cemuLog_logDebug(LogType::Force, "Unsupported IOSU device {}", ioctlHandle);
|
||||
cemu_assert_debug(false);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue