Logging API change (refactor) (#19324)

* Rename LogType to Log

* Explicitly use the Log:: enum when logging. Allows for autocomplete when editing.

* Mac/ARM64 buildfix

* Do the same with the hle result log macros

* Rename the log names to mixed case while at it.

* iOS buildfix

* Qt buildfix attempt, ARM32 buildfix
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2024-07-14 14:42:59 +02:00
1 parent ae3ff686f0
commit e01ca5b057
393 files changed
+6198 -6193

No files matched your search

+45 -45
View File
@@ -46,229 +46,229 @@ class HTTPRequest {
int sceHttpSetResolveRetry(int connectionID, int retryCount) {
ERROR_LOG(SCENET, "UNIMPL sceHttpSetResolveRetry(%d, %d)", connectionID, retryCount);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpSetResolveRetry(%d, %d)", connectionID, retryCount);
return 0;
}
static int sceHttpInit(int unknown) {
ERROR_LOG(SCENET, "UNIMPL sceHttpInit(%i)", unknown);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpInit(%i)", unknown);
return 0;
}
static int sceHttpEnd() {
ERROR_LOG(SCENET, "UNIMPL sceHttpEnd()");
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpEnd()");
return 0;
}
static int sceHttpInitCache(int size) {
ERROR_LOG(SCENET, "UNIMPL sceHttpInitCache(%d)", size);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpInitCache(%d)", size);
return 0;
}
static int sceHttpEndCache() {
ERROR_LOG(SCENET, "UNIMPL sceHttpEndCache()");
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpEndCache()");
return 0;
}
static int sceHttpEnableCache(int id) {
ERROR_LOG(SCENET, "UNIMPL sceHttpEnableCache(%d)", id);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpEnableCache(%d)", id);
return 0;
}
static int sceHttpDisableCache(int id) {
ERROR_LOG(SCENET, "UNIMPL sceHttpDisableCache(%d)", id);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpDisableCache(%d)", id);
return 0;
}
static u32 sceHttpGetProxy(u32 id, u32 activateFlagPtr, u32 modePtr, u32 proxyHostPtr, u32 len, u32 proxyPort) {
ERROR_LOG(SCENET, "UNIMPL sceHttpGetProxy(%d, %x, %x, %x, %d, %x)", id, activateFlagPtr, modePtr, proxyHostPtr, len, proxyPort);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpGetProxy(%d, %x, %x, %x, %d, %x)", id, activateFlagPtr, modePtr, proxyHostPtr, len, proxyPort);
return 0;
}
static int sceHttpGetStatusCode(int requestID, u32 statusCodePtr) {
ERROR_LOG(SCENET, "UNIMPL sceHttpGetStatusCode(%d, %x)", requestID, statusCodePtr);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpGetStatusCode(%d, %x)", requestID, statusCodePtr);
return 0;
}
static int sceHttpReadData(int requestID, u32 dataPtr, u32 dataSize) {
ERROR_LOG(SCENET, "UNIMPL sceHttpReadData(%d, %x, %x)", requestID, dataPtr, dataSize);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpReadData(%d, %x, %x)", requestID, dataPtr, dataSize);
return 0;
}
static int sceHttpSendRequest(int requestID, u32 dataPtr, u32 dataSize) {
ERROR_LOG(SCENET, "UNIMPL sceHttpSendRequest(%d, %x, %x)", requestID, dataPtr, dataSize);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpSendRequest(%d, %x, %x)", requestID, dataPtr, dataSize);
return 0;
}
static int sceHttpDeleteRequest(int requestID) {
ERROR_LOG(SCENET, "UNIMPL sceHttpDeleteRequest(%d)", requestID);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpDeleteRequest(%d)", requestID);
return 0;
}
static int sceHttpDeleteHeader(int id, const char *name) {
ERROR_LOG(SCENET, "UNIMPL sceHttpDeleteHeader(%d, %s)", id, name);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpDeleteHeader(%d, %s)", id, name);
return 0;
}
static int sceHttpDeleteConnection(int connectionID) {
ERROR_LOG(SCENET, "UNIMPL sceHttpDisableCache(%d)", connectionID);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpDisableCache(%d)", connectionID);
return 0;
}
static int sceHttpSetConnectTimeOut(int id, u32 timeout) {
ERROR_LOG(SCENET, "UNIMPL sceHttpSetConnectTimeout(%d, %d)", id, timeout);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpSetConnectTimeout(%d, %d)", id, timeout);
return 0;
}
static int sceHttpSetSendTimeOut(int id, u32 timeout) {
ERROR_LOG(SCENET, "UNIMPL sceHttpSetSendTimeout(%d, %d)", id, timeout);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpSetSendTimeout(%d, %d)", id, timeout);
return 0;
}
static u32 sceHttpSetProxy(u32 id, u32 activateFlagPtr, u32 mode, u32 newProxyHostPtr, u32 newProxyPort) {
ERROR_LOG(SCENET, "UNIMPL sceHttpSetProxy(%d, %x, %x, %x, %d)", id, activateFlagPtr, mode, newProxyHostPtr, newProxyPort);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpSetProxy(%d, %x, %x, %x, %d)", id, activateFlagPtr, mode, newProxyHostPtr, newProxyPort);
return 0;
}
static int sceHttpEnableCookie(int id) {
ERROR_LOG(SCENET, "UNIMPL sceHttpEnableCookie(%d)", id);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpEnableCookie(%d)", id);
return 0;
}
static int sceHttpEnableKeepAlive(int id) {
ERROR_LOG(SCENET, "UNIMPL sceHttpEnableKeepAlive(%d)", id);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpEnableKeepAlive(%d)", id);
return 0;
}
static int sceHttpDisableCookie(int id) {
ERROR_LOG(SCENET, "UNIMPL sceHttpDisableCookie(%d)", id);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpDisableCookie(%d)", id);
return 0;
}
static int sceHttpDisableKeepAlive(int id) {
ERROR_LOG(SCENET, "UNIMPL sceHttpDisableKeepAlive(%d)", id);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpDisableKeepAlive(%d)", id);
return 0;
}
static int sceHttpsInit(int unknown1, int unknown2, int unknown3, int unknown4) {
ERROR_LOG(SCENET, "UNIMPL sceHttpsInit(%d, %d, %d, %d)", unknown1, unknown2, unknown3, unknown4);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpsInit(%d, %d, %d, %d)", unknown1, unknown2, unknown3, unknown4);
return 0;
}
static int sceHttpsEnd() {
ERROR_LOG(SCENET, "UNIMPL sceHttpsEnd()");
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpsEnd()");
return 0;
}
// Parameter "method" should be one of PSPHttpMethod's listed entries
static int sceHttpCreateRequest(int connectionID, int method, const char *path, u64 contentLength) {
ERROR_LOG(SCENET, "UNIMPL sceHttpCreateRequest(%d, %d, %s, %llx)", connectionID, method, path, contentLength);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpCreateRequest(%d, %d, %s, %llx)", connectionID, method, path, contentLength);
return 0;
}
static int sceHttpCreateConnection(int templateID, const char *hostString, const char *unknown1, u32 port, int unknown2) {
ERROR_LOG(SCENET, "UNIMPL sceHttpCreateConnection(%d, %s, %s, %d, %d)", templateID, hostString, unknown1, port, unknown2);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpCreateConnection(%d, %s, %s, %d, %d)", templateID, hostString, unknown1, port, unknown2);
return 0;
}
static int sceHttpGetNetworkErrno(int request, u32 errNumPtr) {
ERROR_LOG(SCENET, "UNIMPL sceHttpGetNetworkErrno(%d, %x)", request, errNumPtr);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpGetNetworkErrno(%d, %x)", request, errNumPtr);
return 0;
}
static int sceHttpAddExtraHeader(int id, const char *name, const char *value, int unknown) {
ERROR_LOG(SCENET, "UNIMPL sceHttpAddExtraHeader(%d, %s, %s, %d)", id, name, value, unknown);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpAddExtraHeader(%d, %s, %s, %d)", id, name, value, unknown);
return 0;
}
static int sceHttpAbortRequest(int requestID) {
ERROR_LOG(SCENET, "UNIMPL sceHttpAbortRequest(%d)", requestID);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpAbortRequest(%d)", requestID);
return 0;
}
static int sceHttpDeleteTemplate(int templateID) {
ERROR_LOG(SCENET, "UNIMPL sceHttpDeleteTemplate(%d)", templateID);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpDeleteTemplate(%d)", templateID);
return 0;
}
static int sceHttpSetMallocFunction(u32 mallocFuncPtr, u32 freeFuncPtr, u32 reallocFuncPtr) {
ERROR_LOG(SCENET, "UNIMPL sceHttpSetMallocFunction(%x, %x, %x)", mallocFuncPtr, freeFuncPtr, reallocFuncPtr);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpSetMallocFunction(%x, %x, %x)", mallocFuncPtr, freeFuncPtr, reallocFuncPtr);
return 0;
}
static int sceHttpSetResolveTimeOut(int id, u32 timeout) {
ERROR_LOG(SCENET, "UNIMPL sceHttpSetResolveTimeOut(%d, %d)", id, timeout);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpSetResolveTimeOut(%d, %d)", id, timeout);
return 0;
}
static int sceHttpSetAuthInfoCB(int id, u32 callbackFuncPtr) {
ERROR_LOG(SCENET, "UNIMPL sceHttpSetAuthInfoCB(%d, %x)", id, callbackFuncPtr);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpSetAuthInfoCB(%d, %x)", id, callbackFuncPtr);
return 0;
}
static int sceHttpEnableRedirect(int id) {
ERROR_LOG(SCENET, "UNIMPL sceHttpEnableRedirect(%d)", id);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpEnableRedirect(%d)", id);
return 0;
}
static int sceHttpEnableAuth(int id) {
ERROR_LOG(SCENET, "UNIMPL sceHttpEnableAuth(%d)", id);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpEnableAuth(%d)", id);
return 0;
}
static int sceHttpDisableRedirect(int id) {
ERROR_LOG(SCENET, "UNIMPL sceHttpDisableRedirect(%d)", id);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpDisableRedirect(%d)", id);
return 0;
}
static int sceHttpDisableAuth(int id) {
ERROR_LOG(SCENET, "UNIMPL sceHttpDisableAuth(%d)", id);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpDisableAuth(%d)", id);
return 0;
}
static int sceHttpSaveSystemCookie() {
ERROR_LOG(SCENET, "UNIMPL sceHttpSaveSystemCookie()");
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpSaveSystemCookie()");
return 0;
}
static int sceHttpsLoadDefaultCert(int unknown1, int unknown2) {
ERROR_LOG(SCENET, "UNIMPL sceHttpLoadDefaultCert(%d, %d)", unknown1, unknown2);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpLoadDefaultCert(%d, %d)", unknown1, unknown2);
return 0;
}
static int sceHttpLoadSystemCookie() {
ERROR_LOG(SCENET, "UNIMPL sceHttpLoadSystemCookie()");
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpLoadSystemCookie()");
return 0;
}
static int sceHttpCreateTemplate(const char *agent, int unknown1, int unknown2) {
ERROR_LOG(SCENET, "UNIMPL sceHttpCreateTemplate(%s, %d, %d)", agent, unknown1, unknown2);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpCreateTemplate(%s, %d, %d)", agent, unknown1, unknown2);
return 0;
}
// Parameter "method" should be one of PSPHttpMethod's listed entries
static int sceHttpCreateRequestWithURL(int connectionID, int method, const char *url, u64 contentLength) {
ERROR_LOG(SCENET, "UNIMPL sceHttpCreateRequestWithURL(%d, %d, %s, %llx)", connectionID, method, url, contentLength);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpCreateRequestWithURL(%d, %d, %s, %llx)", connectionID, method, url, contentLength);
return 0;
}
static int sceHttpCreateConnectionWithURL(int templateID, const char *url, int unknown1) {
ERROR_LOG(SCENET, "UNIMPL sceHttpCreateConnectionWithURL(%d, %s, %d)", templateID, url, unknown1);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpCreateConnectionWithURL(%d, %s, %d)", templateID, url, unknown1);
return 0;
}
static int sceHttpSetRecvTimeOut(int id, u32 timeout) {
ERROR_LOG(SCENET, "UNIMPL sceHttpSetRecvTimeOut(%d, %x)", id, timeout);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpSetRecvTimeOut(%d, %x)", id, timeout);
return 0;
}
static int sceHttpGetAllHeader(int request, u32 headerPtrToPtr, u32 headerSize) {
ERROR_LOG(SCENET, "UNIMPL sceHttpGetAllHeader(%d, %x, %x)", request, headerPtrToPtr, headerSize);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpGetAllHeader(%d, %x, %x)", request, headerPtrToPtr, headerSize);
return 0;
}
static int sceHttpGetContentLength(int requestID, u64 contentLengthPtr) {
ERROR_LOG(SCENET, "UNIMPL sceHttpGetContentLength(%d, %llx)", requestID, contentLengthPtr);
ERROR_LOG(Log::sceNet, "UNIMPL sceHttpGetContentLength(%d, %llx)", requestID, contentLengthPtr);
return 0;
}