mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-09 04:37:30 +02:00
[FancyZones] logging on the editor exit event (#8422)
This commit is contained in:
@@ -1302,6 +1302,7 @@ bool FancyZones::IsSplashScreen(HWND window)
|
|||||||
|
|
||||||
void FancyZones::OnEditorExitEvent() noexcept
|
void FancyZones::OnEditorExitEvent() noexcept
|
||||||
{
|
{
|
||||||
|
Logger::trace("OnEditorExitEvent");
|
||||||
// Collect information about changes in zone layout after editor exited.
|
// Collect information about changes in zone layout after editor exited.
|
||||||
FancyZonesDataInstance().ParseDataFromTmpFiles();
|
FancyZonesDataInstance().ParseDataFromTmpFiles();
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
#include "trace.h"
|
#include "trace.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
|
#include <common/logger/logger.h>
|
||||||
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
@@ -691,6 +693,10 @@ namespace JSONHelpers
|
|||||||
{
|
{
|
||||||
result = std::move(deviceInfo);
|
result = std::move(deviceInfo);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Logger::trace(L"ParseDeviceInfoFromTmpFile: AppliedZonesetsJSON::FromJson parsing error, {}", zoneSetJson.value().Stringify());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -714,11 +720,16 @@ namespace JSONHelpers
|
|||||||
{
|
{
|
||||||
result.emplace_back(std::move(*customZoneSet));
|
result.emplace_back(std::move(*customZoneSet));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Logger::trace(L"ParseCustomZoneSetsFromTmpFile: CustomZoneSetJSON::FromJson parsing error, {}", zoneSet.GetObjectW().Stringify());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (const winrt::hresult_error&)
|
catch (const winrt::hresult_error& err)
|
||||||
{
|
{
|
||||||
|
Logger::trace(L"ParseCustomZoneSetsFromTmpFile: CustomZoneSetJSON::FromJson parsing error, {}", err.message());
|
||||||
}
|
}
|
||||||
|
|
||||||
DeleteTmpFile(tmpFilePath);
|
DeleteTmpFile(tmpFilePath);
|
||||||
|
|||||||
Reference in New Issue
Block a user