Remove deprecated logging system and expose developer logging window (#825)

This commit is contained in:
Crementif 2023-05-20 02:46:12 +02:00 committed by GitHub
parent b8dec03cb5
commit d903b2cf12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
47 changed files with 148 additions and 283 deletions

View file

@ -84,7 +84,7 @@ void createGraphicPackDownloadedVersionFile(const char* nameVersion)
file->writeString(nameVersion);
else
{
cemuLog_force("Failed to write graphic pack version.txt");
cemuLog_log(LogType::Force, "Failed to write graphic pack version.txt");
}
}

View file

@ -21,7 +21,7 @@ LoggingWindow::LoggingWindow(wxFrame* parent)
filter_row->Add(new wxStaticText( this, wxID_ANY, _("Filter")), 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
wxString choices[] = {"Coreinit File-Access", "Coreinit Thread-Synchronization", "Coreinit Memory", "GX2", "Audio", "Input", "Socket", "Save", "H264", "Texture Cache", "OpenGL"};
wxString choices[] = {"Unsupported APIs calls", "Coreinit Logging", "Coreinit File-Access", "Coreinit Thread-Synchronization", "Coreinit Memory", "Coreinit MP", "Coreinit Thread", "nn::nfp", "GX2", "Audio", "Input", "Socket", "Save", "H264", "Graphic pack patches", "Texture cache", "Texture readback", "OpenGL debug output", "Vulkan validation layer"};
m_filter = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, std::size(choices), choices, 0 );
m_filter->Bind(wxEVT_COMBOBOX, &LoggingWindow::OnFilterChange, this);
m_filter->Bind(wxEVT_TEXT, &LoggingWindow::OnFilterChange, this);

View file

@ -1089,7 +1089,7 @@ void MainWindow::OnDebugLoggingToggleFlagGeneric(wxCommandEvent& event)
sint32 id = event.GetId();
if (id >= loggingIdBase && id < (MAINFRAME_MENU_ID_DEBUG_LOGGING0 + 64))
{
cafeLog_setLoggingFlagEnable(id - loggingIdBase, event.IsChecked());
cemuLog_setFlag(static_cast<LogType>(id - loggingIdBase), event.IsChecked());
}
}
@ -2193,9 +2193,7 @@ void MainWindow::RecreateMenu()
debugLoggingMenu->AppendSeparator();
debugLoggingMenu->AppendCheckItem(MAINFRAME_MENU_ID_DEBUG_LOGGING0 + stdx::to_underlying(LogType::OpenGLLogging), _("&OpenGL debug output"), wxEmptyString)->Check(cemuLog_isLoggingEnabled(LogType::OpenGLLogging));
debugLoggingMenu->AppendCheckItem(MAINFRAME_MENU_ID_DEBUG_LOGGING0 + stdx::to_underlying(LogType::VulkanValidation), _("&Vulkan validation layer (slow)"), wxEmptyString)->Check(cemuLog_isLoggingEnabled(LogType::VulkanValidation));
#ifdef CEMU_DEBUG_ASSERT
debugLoggingMenu->AppendCheckItem(MAINFRAME_MENU_ID_DEBUG_ADVANCED_PPC_INFO, _("&Log PPC context for API"), wxEmptyString)->Check(cemuLog_advancedPPCLoggingEnabled());
#endif
m_loggingSubmenu = debugLoggingMenu;
// debug->dump submenu
wxMenu* debugDumpMenu = new wxMenu;
@ -2224,9 +2222,7 @@ void MainWindow::RecreateMenu()
audioAuxOnly->Check(ActiveSettings::AudioOutputOnlyAux());
#endif
#ifdef CEMU_DEBUG_ASSERT
debugMenu->Append(MAINFRAME_MENU_ID_DEBUG_VIEW_LOGGING_WINDOW, _("&Open logging window"));
#endif
m_gdbstub_toggle = debugMenu->AppendCheckItem(MAINFRAME_MENU_ID_DEBUG_TOGGLE_GDB_STUB, _("&Launch with GDB stub"), wxEmptyString);
m_gdbstub_toggle->Check(g_gdbstub != nullptr);
m_gdbstub_toggle->Enable(!m_game_launched);
@ -2263,8 +2259,8 @@ void MainWindow::RecreateMenu()
m_nfcMenu->Enable(MAINFRAME_MENU_ID_NFC_TOUCH_NFC_FILE, true);
// disable OpenGL logging (currently cant be toggled after OpenGL backend is initialized)
m_loggingSubmenu->Enable(MAINFRAME_MENU_ID_DEBUG_LOGGING0 + LOG_TYPE_OPENGL, false);
m_loggingSubmenu->Enable(MAINFRAME_MENU_ID_DEBUG_LOGGING0 + LOG_TYPE_VULKAN_VALIDATION, false);
m_loggingSubmenu->Enable(MAINFRAME_MENU_ID_DEBUG_LOGGING0 + stdx::to_underlying(LogType::OpenGLLogging), false);
m_loggingSubmenu->Enable(MAINFRAME_MENU_ID_DEBUG_LOGGING0 + stdx::to_underlying(LogType::VulkanValidation), false);
UpdateNFCMenu();
}

View file

@ -77,7 +77,7 @@ public:
{
if (eglSwapInterval(eglGetCurrentDisplay(), configValue) == EGL_FALSE)
{
cemuLog_force("Failed to set vsync using EGL");
cemuLog_log(LogType::Force, "Failed to set vsync using EGL");
}
}
#else