mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
[MWB][CQ]Refactoring "Common" classes - Common.Log.cs (#35156)
* [MouseWithoutBorders] - split "Common.Log.cs" into "Logger.cs" * [MouseWithoutBorders] - fix references to Logger * [MouseWithoutBorders] - add MouseWithoutBorders.UnitTests * [MouseWithoutBorders] - fixing broken tests * [MouseWithoutBorders] - fixing spelling * [MouseWithoutBorders] - fixing spelling * [MouseWithoutBorders] - fixing resource filename casing * [MouseWithoutBorders] - fixing resource filename casing * [MouseWithoutBorders] - fixing resource filename casing * [MouseWithoutBorders] - fixing resource filename casing * [MouseWithoutBorders] - fixed compile error * [MouseWithoutBorders] - fixed failing test * [MouseWithoutBorders] - fixed failing build * [MouseWithoutBorders] - ignore flakey test
This commit is contained in:
@@ -29,6 +29,7 @@ using Microsoft.PowerToys.Settings.UI.Library.Utilities;
|
||||
// 2023- Included in PowerToys.
|
||||
// </history>
|
||||
using Microsoft.Win32;
|
||||
using MouseWithoutBorders.Core;
|
||||
using Settings.UI.Library.Attributes;
|
||||
|
||||
[module: SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Scope = "member", Target = "MouseWithoutBorders.Properties.Setting.Values.#LoadIntSetting(System.String,System.Int32)", Justification = "Dotnet port with style preservation")]
|
||||
@@ -133,7 +134,7 @@ namespace MouseWithoutBorders.Class
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
Logger.LogEvent($"Failed to read settings: {ex.Message}", System.Diagnostics.EventLogEntryType.Error);
|
||||
EventLogger.LogEvent($"Failed to read settings: {ex.Message}", System.Diagnostics.EventLogEntryType.Error);
|
||||
}
|
||||
|
||||
PauseInstantSaving = false;
|
||||
@@ -168,7 +169,7 @@ namespace MouseWithoutBorders.Class
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
Logger.LogEvent($"Failed to write settings: {ex.Message}", System.Diagnostics.EventLogEntryType.Error);
|
||||
EventLogger.LogEvent($"Failed to write settings: {ex.Message}", System.Diagnostics.EventLogEntryType.Error);
|
||||
}
|
||||
|
||||
if (saved)
|
||||
@@ -198,7 +199,7 @@ namespace MouseWithoutBorders.Class
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogEvent($"Failed to update settings: {ex.Message}", System.Diagnostics.EventLogEntryType.Error);
|
||||
EventLogger.LogEvent($"Failed to update settings: {ex.Message}", System.Diagnostics.EventLogEntryType.Error);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -442,7 +443,7 @@ namespace MouseWithoutBorders.Class
|
||||
{
|
||||
if (_properties.SecurityKey.Value.Length != 0)
|
||||
{
|
||||
Common.LogDebug("GETSECKEY: Key was already loaded/set: " + _properties.SecurityKey.Value);
|
||||
Logger.LogDebug("GETSECKEY: Key was already loaded/set: " + _properties.SecurityKey.Value);
|
||||
return _properties.SecurityKey.Value;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user