Runner logging (#8068)

This commit is contained in:
Mykhailo Pylyp
2020-11-18 12:15:14 +02:00
committed by GitHub
parent 60a5c3f946
commit 613d1fdf2a
24 changed files with 464 additions and 7 deletions

View File

@@ -18,6 +18,7 @@ auto Strings = create_notifications_strings();
#define STR_HELPER(x) #x
#define STR(x) STR_HELPER(x)
namespace // Strings in this namespace should not be localized
{
const wchar_t APPLICATION_ID[] = L"PowerToysInstaller";
@@ -61,7 +62,7 @@ void setup_log(fs::path directory, const spdlog::level::level_enum severity)
std::shared_ptr<spdlog::logger> logger;
if (severity != spdlog::level::off)
{
logger = spdlog::basic_logger_mt("file", (directory / LOG_FILENAME).string());
logger = spdlog::basic_logger_mt("file", (directory / LOG_FILENAME).wstring());
std::error_code _;
const DWORD msiSev = severity == spdlog::level::debug ? INSTALLLOGMODE_VERBOSE : INSTALLLOGMODE_ERROR;