mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-10 22:28:03 -05:00
Add configurable logging backends
This commit is contained in:
@ -31,6 +31,7 @@
|
||||
#include "yuzu/bootmanager.h"
|
||||
#include "yuzu/configuration/config.h"
|
||||
#include "yuzu/configuration/configure_dialog.h"
|
||||
#include "yuzu/debugger/console.h"
|
||||
#include "yuzu/debugger/graphics/graphics_breakpoints.h"
|
||||
#include "yuzu/debugger/graphics/graphics_surface.h"
|
||||
#include "yuzu/debugger/profiler.h"
|
||||
@ -261,6 +262,7 @@ void GMainWindow::RestoreUIState() {
|
||||
|
||||
ui.action_Show_Status_Bar->setChecked(UISettings::values.show_status_bar);
|
||||
statusBar()->setVisible(ui.action_Show_Status_Bar->isChecked());
|
||||
Debugger::ToggleConsole();
|
||||
}
|
||||
|
||||
void GMainWindow::ConnectWidgetEvents() {
|
||||
@ -906,8 +908,7 @@ void GMainWindow::UpdateUITheme() {
|
||||
#endif
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
Log::Filter log_filter(Log::Level::Info);
|
||||
Log::SetFilter(&log_filter);
|
||||
Log::AddBackend(std::make_unique<Log::ColorConsoleBackend>());
|
||||
|
||||
MicroProfileOnThreadCreate("Frontend");
|
||||
SCOPE_EXIT({ MicroProfileShutdown(); });
|
||||
@ -925,7 +926,12 @@ int main(int argc, char* argv[]) {
|
||||
|
||||
GMainWindow main_window;
|
||||
// After settings have been loaded by GMainWindow, apply the filter
|
||||
Log::Filter log_filter;
|
||||
log_filter.ParseFilterString(Settings::values.log_filter);
|
||||
Log::SetGlobalFilter(log_filter);
|
||||
FileUtil::CreateFullPath(FileUtil::GetUserPath(D_LOGS_IDX));
|
||||
Log::AddBackend(
|
||||
std::make_unique<Log::FileBackend>(FileUtil::GetUserPath(D_LOGS_IDX) + LOG_FILE));
|
||||
|
||||
main_window.show();
|
||||
return app.exec();
|
||||
|
Reference in New Issue
Block a user