diff options
author | bunnei <bunneidev@gmail.com> | 2021-08-23 05:40:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-23 05:40:18 +0200 |
commit | f65f8b909773ba79f54423c7d5d5eb1653cb7733 (patch) | |
tree | 3e851ea4e3bf6a353dba89029ab087709d33e366 /src/yuzu_cmd/yuzu.cpp | |
parent | Merge pull request #6904 from Morph1984/lang-settings-range (diff) | |
parent | logging: Simplify and make thread-safe (diff) | |
download | yuzu-f65f8b909773ba79f54423c7d5d5eb1653cb7733.tar yuzu-f65f8b909773ba79f54423c7d5d5eb1653cb7733.tar.gz yuzu-f65f8b909773ba79f54423c7d5d5eb1653cb7733.tar.bz2 yuzu-f65f8b909773ba79f54423c7d5d5eb1653cb7733.tar.lz yuzu-f65f8b909773ba79f54423c7d5d5eb1653cb7733.tar.xz yuzu-f65f8b909773ba79f54423c7d5d5eb1653cb7733.tar.zst yuzu-f65f8b909773ba79f54423c7d5d5eb1653cb7733.zip |
Diffstat (limited to 'src/yuzu_cmd/yuzu.cpp')
-rw-r--r-- | src/yuzu_cmd/yuzu.cpp | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index c10093820..ba2c993ba 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp @@ -74,31 +74,14 @@ static void PrintVersion() { std::cout << "yuzu " << Common::g_scm_branch << " " << Common::g_scm_desc << std::endl; } -static void InitializeLogging() { - using namespace Common; - - Log::Filter log_filter(Log::Level::Debug); - log_filter.ParseFilterString(static_cast<std::string>(Settings::values.log_filter)); - Log::SetGlobalFilter(log_filter); - - Log::AddBackend(std::make_unique<Log::ColorConsoleBackend>()); - - const auto& log_dir = FS::GetYuzuPath(FS::YuzuPath::LogDir); - void(FS::CreateDir(log_dir)); - Log::AddBackend(std::make_unique<Log::FileBackend>(log_dir / LOG_FILE)); -#ifdef _WIN32 - Log::AddBackend(std::make_unique<Log::DebuggerBackend>()); -#endif -} - /// Application entry point int main(int argc, char** argv) { + Common::Log::Initialize(); + Common::Log::SetColorConsoleBackendEnabled(true); Common::DetachedTasks detached_tasks; Config config; int option_index = 0; - - InitializeLogging(); #ifdef _WIN32 int argc_w; auto argv_w = CommandLineToArgvW(GetCommandLineW(), &argc_w); @@ -163,6 +146,7 @@ int main(int argc, char** argv) { return -1; } + Core::System::InitializeGlobalInstance(); auto& system{Core::System::GetInstance()}; InputCommon::InputSubsystem input_subsystem; |