Merge pull request #6638 from GPUCode/new-log

common: Backport yuzu log improvements
This commit is contained in:
GPUCode 2023-07-06 23:44:54 +03:00 committed by GitHub
commit 4ccd9f24fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
48 changed files with 1201 additions and 750 deletions

View file

@ -150,15 +150,8 @@ static void SaveBanList(const Network::Room::BanList& ban_list, const std::strin
}
static void InitializeLogging(const std::string& log_file) {
Log::AddBackend(std::make_unique<Log::ColorConsoleBackend>());
const std::string& log_dir = FileUtil::GetUserPath(FileUtil::UserPath::LogDir);
FileUtil::CreateFullPath(log_dir);
Log::AddBackend(std::make_unique<Log::FileBackend>(log_dir + log_file));
#ifdef _WIN32
Log::AddBackend(std::make_unique<Log::DebuggerBackend>());
#endif
Common::Log::Initialize(log_file);
Common::Log::SetColorConsoleBackendEnabled(true);
}
/// Application entry point