From 638956aa81de255bf4bbd4e69a717eabf4ceadb9 Mon Sep 17 00:00:00 2001 From: James Rowe Date: Mon, 2 Jul 2018 10:13:26 -0600 Subject: Rename logging macro back to LOG_* --- src/yuzu_cmd/yuzu.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/yuzu_cmd/yuzu.cpp') diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index 95e568b7b..91b024819 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp @@ -69,7 +69,7 @@ int main(int argc, char** argv) { auto argv_w = CommandLineToArgvW(GetCommandLineW(), &argc_w); if (argv_w == nullptr) { - NGLOG_CRITICAL(Frontend, "Failed to get command line arguments"); + LOG_CRITICAL(Frontend, "Failed to get command line arguments"); return -1; } #endif @@ -102,7 +102,7 @@ int main(int argc, char** argv) { break; case 'f': fullscreen = true; - NGLOG_INFO(Frontend, "Starting in fullscreen mode..."); + LOG_INFO(Frontend, "Starting in fullscreen mode..."); break; case 'h': PrintHelp(argv[0]); @@ -132,7 +132,7 @@ int main(int argc, char** argv) { SCOPE_EXIT({ MicroProfileShutdown(); }); if (filepath.empty()) { - NGLOG_CRITICAL(Frontend, "Failed to load ROM: No ROM specified"); + LOG_CRITICAL(Frontend, "Failed to load ROM: No ROM specified"); return -1; } @@ -153,28 +153,28 @@ int main(int argc, char** argv) { switch (load_result) { case Core::System::ResultStatus::ErrorGetLoader: - NGLOG_CRITICAL(Frontend, "Failed to obtain loader for %s!", filepath.c_str()); + LOG_CRITICAL(Frontend, "Failed to obtain loader for %s!", filepath.c_str()); return -1; case Core::System::ResultStatus::ErrorLoader: - NGLOG_CRITICAL(Frontend, "Failed to load ROM!"); + LOG_CRITICAL(Frontend, "Failed to load ROM!"); return -1; case Core::System::ResultStatus::ErrorLoader_ErrorEncrypted: - NGLOG_CRITICAL(Frontend, "The game that you are trying to load must be decrypted before " + LOG_CRITICAL(Frontend, "The game that you are trying to load must be decrypted before " "being used with yuzu. \n\n For more information on dumping and " "decrypting games, please refer to: " "https://yuzu-emu.org/wiki/dumping-game-cartridges/"); return -1; case Core::System::ResultStatus::ErrorLoader_ErrorInvalidFormat: - NGLOG_CRITICAL(Frontend, "Error while loading ROM: The ROM format is not supported."); + LOG_CRITICAL(Frontend, "Error while loading ROM: The ROM format is not supported."); return -1; case Core::System::ResultStatus::ErrorNotInitialized: - NGLOG_CRITICAL(Frontend, "CPUCore not initialized"); + LOG_CRITICAL(Frontend, "CPUCore not initialized"); return -1; case Core::System::ResultStatus::ErrorSystemMode: - NGLOG_CRITICAL(Frontend, "Failed to determine system mode!"); + LOG_CRITICAL(Frontend, "Failed to determine system mode!"); return -1; case Core::System::ResultStatus::ErrorVideoCore: - NGLOG_CRITICAL(Frontend, "VideoCore not initialized"); + LOG_CRITICAL(Frontend, "VideoCore not initialized"); return -1; case Core::System::ResultStatus::Success: break; // Expected case -- cgit v1.2.3 From 0d46f0df122dbc9b9a9d9f97e2da6b1953ef939b Mon Sep 17 00:00:00 2001 From: James Rowe Date: Mon, 2 Jul 2018 10:20:50 -0600 Subject: Update clang format --- src/yuzu_cmd/yuzu.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/yuzu_cmd/yuzu.cpp') diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index 91b024819..079f93736 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp @@ -160,9 +160,9 @@ int main(int argc, char** argv) { return -1; case Core::System::ResultStatus::ErrorLoader_ErrorEncrypted: LOG_CRITICAL(Frontend, "The game that you are trying to load must be decrypted before " - "being used with yuzu. \n\n For more information on dumping and " - "decrypting games, please refer to: " - "https://yuzu-emu.org/wiki/dumping-game-cartridges/"); + "being used with yuzu. \n\n For more information on dumping and " + "decrypting games, please refer to: " + "https://yuzu-emu.org/wiki/dumping-game-cartridges/"); return -1; case Core::System::ResultStatus::ErrorLoader_ErrorInvalidFormat: LOG_CRITICAL(Frontend, "Error while loading ROM: The ROM format is not supported."); -- cgit v1.2.3 From 6269a01b4e9963ffdaf98ddf5d5f2a90d49e58ff Mon Sep 17 00:00:00 2001 From: James Rowe Date: Mon, 2 Jul 2018 11:10:41 -0600 Subject: Add configurable logging backends --- src/yuzu_cmd/yuzu.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/yuzu_cmd/yuzu.cpp') diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index 079f93736..89a3e9f30 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp @@ -126,7 +126,12 @@ int main(int argc, char** argv) { #endif Log::Filter log_filter(Log::Level::Debug); - Log::SetFilter(&log_filter); + Log::SetGlobalFilter(log_filter); + + Log::AddBackend(std::make_unique()); + FileUtil::CreateFullPath(FileUtil::GetUserPath(D_LOGS_IDX)); + Log::AddBackend( + std::make_unique(FileUtil::GetUserPath(D_LOGS_IDX) + LOG_FILE)); MicroProfileOnThreadCreate("EmuThread"); SCOPE_EXIT({ MicroProfileShutdown(); }); -- cgit v1.2.3 From 76b475faf774a7a357bdc707e556c75f7975bc45 Mon Sep 17 00:00:00 2001 From: bunnei Date: Mon, 2 Jul 2018 21:39:22 -0400 Subject: Fix build and address review feedback --- src/yuzu_cmd/yuzu.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/yuzu_cmd/yuzu.cpp') diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index 89a3e9f30..8ddd202d8 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp @@ -7,6 +7,7 @@ #include #include +#include "common/common_paths.h" #include "common/logging/backend.h" #include "common/logging/filter.h" #include "common/logging/log.h" -- cgit v1.2.3