mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-24 04:00:02 +01:00
[PT Run] Add logs for Launcher (#8489)
This commit is contained in:
@@ -294,10 +294,11 @@ public:
|
||||
{
|
||||
if (WaitForSingleObject(m_hProcess, 0) == WAIT_OBJECT_0)
|
||||
{
|
||||
// The process exited, restart it
|
||||
Logger::warn("PowerToys Run has exited unexpectedly, restarting PowerToys Run.");
|
||||
enable();
|
||||
}
|
||||
|
||||
Logger::trace("Set POWER_LAUNCHER_SHARED_EVENT");
|
||||
SetEvent(m_hEvent);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3,8 +3,10 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using Wox.Plugin.Logger;
|
||||
|
||||
namespace PowerLauncher.Helper
|
||||
{
|
||||
@@ -19,6 +21,7 @@ namespace PowerLauncher.Helper
|
||||
{
|
||||
if (eventHandle.WaitOne())
|
||||
{
|
||||
Log.Info("Successfully waited for POWER_LAUNCHER_SHARED_EVENT", MethodBase.GetCurrentMethod().DeclaringType);
|
||||
Application.Current.Dispatcher.Invoke(callback);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
@@ -23,6 +24,7 @@ using Wox.Infrastructure.Hotkey;
|
||||
using Wox.Infrastructure.Storage;
|
||||
using Wox.Infrastructure.UserSettings;
|
||||
using Wox.Plugin;
|
||||
using Wox.Plugin.Logger;
|
||||
|
||||
namespace PowerLauncher.ViewModel
|
||||
{
|
||||
@@ -742,6 +744,7 @@ namespace PowerLauncher.ViewModel
|
||||
{
|
||||
Application.Current.Dispatcher.Invoke(() =>
|
||||
{
|
||||
Log.Info("OnHotkey", MethodBase.GetCurrentMethod().DeclaringType);
|
||||
if (!ShouldIgnoreHotkeys())
|
||||
{
|
||||
// If launcher window was hidden and the hotkey was pressed, start telemetry event
|
||||
|
||||
Reference in New Issue
Block a user