mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
[Awake]Log error with Logger instead of console (#35100)
This commit is contained in:
@@ -32,7 +32,7 @@ parameters:
|
|||||||
- name: enableMsBuildCaching
|
- name: enableMsBuildCaching
|
||||||
type: boolean
|
type: boolean
|
||||||
displayName: "Enable MSBuild Caching"
|
displayName: "Enable MSBuild Caching"
|
||||||
default: true
|
default: false
|
||||||
- name: runTests
|
- name: runTests
|
||||||
type: boolean
|
type: boolean
|
||||||
displayName: "Run Tests"
|
displayName: "Run Tests"
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ using System.Runtime.InteropServices;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
using Awake.Core.Models;
|
using Awake.Core.Models;
|
||||||
using Awake.Core.Native;
|
using Awake.Core.Native;
|
||||||
using Awake.Properties;
|
using Awake.Properties;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using ManagedCommon;
|
||||||
|
|
||||||
namespace Awake.Core.Threading
|
namespace Awake.Core.Threading
|
||||||
{
|
{
|
||||||
@@ -49,7 +50,7 @@ namespace Awake.Core.Threading
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Error during execution: " + e.Message);
|
Logger.LogError("Error during execution of the STS context message loop: " + e.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -58,7 +59,8 @@ namespace Awake.Core.Threading
|
|||||||
{
|
{
|
||||||
lock (queue)
|
lock (queue)
|
||||||
{
|
{
|
||||||
queue.Enqueue(null); // Signal the end of the message loop
|
// Signal the end of the message loop
|
||||||
|
queue.Enqueue(null);
|
||||||
Monitor.Pulse(queue);
|
Monitor.Pulse(queue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ using System.Reflection;
|
|||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
using Awake.Core;
|
using Awake.Core;
|
||||||
using Awake.Core.Models;
|
using Awake.Core.Models;
|
||||||
using Awake.Core.Native;
|
using Awake.Core.Native;
|
||||||
|
|||||||
Reference in New Issue
Block a user