diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index 5d7a402dd6..bdae0338be 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -327,6 +327,7 @@ DEFAULTTONULL DEFAULTTOPRIMARY DEFERERASE DEFPUSHBUTTON +DEFT deinitialization DELA DELETEDKEYIMAGE @@ -347,6 +348,7 @@ devmgmt DEVMODE DEVMODEW devpal +DFX DIALOGEX digicert dimm diff --git a/.pipelines/tsa.json b/.pipelines/tsa.json index 2f1e84c7f1..558515675c 100644 --- a/.pipelines/tsa.json +++ b/.pipelines/tsa.json @@ -3,5 +3,5 @@ "notificationAliases": ["powertoys@microsoft.com"], "instanceUrl": "https://microsoft.visualstudio.com", "projectName": "OS", - "areaPath": "OS\\Windows Client and Services\\WinPD\\DEEP-Developer Experience, Ecosystem and Partnerships\\DIVE\\PowerToys" + "areaPath": "OS\\Windows Client and Services\\WinPD\\DFX-Developer Fundamentals and Experiences\\DEFT\\PowerToys" } diff --git a/.pipelines/v2/release.yml b/.pipelines/v2/release.yml index 2a5be93aec..bd825355dd 100644 --- a/.pipelines/v2/release.yml +++ b/.pipelines/v2/release.yml @@ -112,10 +112,12 @@ extends: # Prepare the localizations and telemetry config before the release build - template: .pipelines/v2/templates/steps-fetch-and-prepare-localizations.yml@self - - script: | - call nuget.exe restore -configFile .pipelines/release-nuget.config -PackagesDirectory . .pipelines/packages.config || exit /b 1 - move /Y "Microsoft.PowerToys.Telemetry.2.0.2\build\include\TraceLoggingDefines.h" "src\common\Telemetry\TraceLoggingDefines.h" || exit /b 1 - move /Y "Microsoft.PowerToys.Telemetry.2.0.2\build\include\TelemetryBase.cs" "src\common\Telemetry\TelemetryBase.cs" || exit /b 1 + - pwsh: |- + $ErrorActionPreference = 'Stop' + $PSNativeCommandUseErrorActionPreference = $true + & nuget.exe restore -configFile .pipelines/release-nuget.config -PackagesDirectory . .pipelines/packages.config + Move-Item -Force -Verbose "Microsoft.PowerToys.Telemetry.*\build\include\TraceLoggingDefines.h" "src\common\Telemetry\TraceLoggingDefines.h" + Move-Item -Force -Verbose "Microsoft.PowerToys.Telemetry.*\build\include\TelemetryBase.cs" "src\common\Telemetry\TelemetryBase.cs" displayName: Emplace telemetry files - stage: Build_SDK diff --git a/src/modules/AdvancedPaste/AdvancedPaste.FuzzTests/OneFuzzConfig.json b/src/modules/AdvancedPaste/AdvancedPaste.FuzzTests/OneFuzzConfig.json index 41bdc8c58a..bad72df342 100644 --- a/src/modules/AdvancedPaste/AdvancedPaste.FuzzTests/OneFuzzConfig.json +++ b/src/modules/AdvancedPaste/AdvancedPaste.FuzzTests/OneFuzzConfig.json @@ -17,7 +17,7 @@ "org": "microsoft", "project": "OS", "AssignedTo": "leilzh@microsoft.com", - "AreaPath": "OS\\Windows Client and Services\\WinPD\\DEEP-Developer Experience, Ecosystem and Partnerships\\SHINE\\PowerToys", + "AreaPath": "OS\\Windows Client and Services\\WinPD\\DEEP-Developer Experience, Ecosystem and Partnerships\\DIVE\\SALT", "IterationPath": "OS\\Future" }, "jobNotificationEmail": "leilzh@microsoft.com", diff --git a/src/modules/Hosts/Hosts.FuzzTests/OneFuzzConfig.json b/src/modules/Hosts/Hosts.FuzzTests/OneFuzzConfig.json index f091a1ed00..a6cb6ef39d 100644 --- a/src/modules/Hosts/Hosts.FuzzTests/OneFuzzConfig.json +++ b/src/modules/Hosts/Hosts.FuzzTests/OneFuzzConfig.json @@ -17,7 +17,7 @@ "org": "microsoft", "project": "OS", "AssignedTo": "mengyuanchen@microsoft.com", - "AreaPath": "OS\\Windows Client and Services\\WinPD\\DEEP-Developer Experience, Ecosystem and Partnerships\\SHINE\\PowerToys", + "AreaPath": "OS\\Windows Client and Services\\WinPD\\DEEP-Developer Experience, Ecosystem and Partnerships\\DIVE\\SALT", "IterationPath": "OS\\Future" }, "jobNotificationEmail": "mengyuanchen@microsoft.com", @@ -58,7 +58,7 @@ "org": "microsoft", "project": "OS", "AssignedTo": "mengyuanchen@microsoft.com", - "AreaPath": "OS\\Windows Client and Services\\WinPD\\DEEP-Developer Experience, Ecosystem and Partnerships\\SHINE\\PowerToys", + "AreaPath": "OS\\Windows Client and Services\\WinPD\\DEEP-Developer Experience, Ecosystem and Partnerships\\DIVE\\SALT", "IterationPath": "OS\\Future" }, "jobNotificationEmail": "mengyuanchen@microsoft.com", @@ -99,7 +99,7 @@ "org": "microsoft", "project": "OS", "AssignedTo": "mengyuanchen@microsoft.com", - "AreaPath": "OS\\Windows Client and Services\\WinPD\\DEEP-Developer Experience, Ecosystem and Partnerships\\SHINE\\PowerToys", + "AreaPath": "OS\\Windows Client and Services\\WinPD\\DEEP-Developer Experience, Ecosystem and Partnerships\\DIVE\\SALT", "IterationPath": "OS\\Future" }, "jobNotificationEmail": "mengyuanchen@microsoft.com", @@ -140,7 +140,7 @@ "org": "microsoft", "project": "OS", "AssignedTo": "mengyuanchen@microsoft.com", - "AreaPath": "OS\\Windows Client and Services\\WinPD\\DEEP-Developer Experience, Ecosystem and Partnerships\\SHINE\\PowerToys", + "AreaPath": "OS\\Windows Client and Services\\WinPD\\DEEP-Developer Experience, Ecosystem and Partnerships\\DIVE\\SALT", "IterationPath": "OS\\Future" }, "jobNotificationEmail": "mengyuanchen@microsoft.com", diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/AppCommand.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/AppCommand.cs index 682c79bdb8..cb57086cb3 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/AppCommand.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/AppCommand.cs @@ -2,8 +2,10 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System; using System.Diagnostics; using System.Threading.Tasks; +using ManagedCommon; using Microsoft.CmdPal.Ext.Apps.Programs; using Microsoft.CmdPal.Ext.Apps.Properties; using Microsoft.CommandPalette.Extensions.Toolkit; @@ -33,8 +35,9 @@ internal sealed partial class AppCommand : InvokableCommand { appManager.ActivateApplication(aumid, /*queryArguments*/ string.Empty, noFlags, out var unusedPid); } - catch (System.Exception) + catch (System.Exception ex) { + Logger.LogError(ex.Message); } }).ConfigureAwait(false); } @@ -46,7 +49,14 @@ internal sealed partial class AppCommand : InvokableCommand // const ActivateOptions noFlags = ActivateOptions.None; await Task.Run(() => { - Process.Start(new ProcessStartInfo(path) { UseShellExecute = true }); + try + { + Process.Start(new ProcessStartInfo(path) { UseShellExecute = true }); + } + catch (System.Exception ex) + { + Logger.LogError(ex.Message); + } }); } diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Commands/OpenInConsoleCommand.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Commands/OpenInConsoleCommand.cs index de68cafeb8..41e934759a 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Commands/OpenInConsoleCommand.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Commands/OpenInConsoleCommand.cs @@ -5,6 +5,7 @@ using System; using System.Diagnostics; using System.Threading.Tasks; +using ManagedCommon; using Microsoft.CmdPal.Ext.Apps.Properties; using Microsoft.CommandPalette.Extensions.Toolkit; @@ -38,9 +39,9 @@ internal sealed partial class OpenInConsoleCommand : InvokableCommand Process.Start(processStartInfo); } - catch (Exception) + catch (Exception ex) { - // Log.Exception($"Failed to open {Name} in console, {e.Message}", e, GetType()); + Logger.LogError(ex.Message); } }); } diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Programs/PackageWrapper.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Programs/PackageWrapper.cs index 2de128c05c..108195390e 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Programs/PackageWrapper.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Programs/PackageWrapper.cs @@ -4,6 +4,7 @@ using System; using System.IO; +using ManagedCommon; using Windows.Foundation.Metadata; using Package = Windows.ApplicationModel.Package; diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Programs/UWP.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Programs/UWP.cs index beba2b185a..e115911001 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Programs/UWP.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Programs/UWP.cs @@ -7,7 +7,9 @@ using System.Collections.Generic; using System.IO.Abstractions; using System.Linq; using System.Xml.Linq; +using ManagedCommon; using Microsoft.CmdPal.Ext.Apps.Utils; +using Microsoft.CommandPalette.Extensions.Toolkit; using Windows.Win32; using Windows.Win32.Foundation; using Windows.Win32.System.Com; @@ -131,8 +133,9 @@ public partial class UWP u = new UWP(p); u.InitializeAppInfo(p.InstalledLocation); } - catch (Exception ) + catch (Exception ex) { + Logger.LogError(ex.Message); return Array.Empty(); } @@ -161,8 +164,9 @@ public partial class UWP var path = p.InstalledLocation; return !f && !string.IsNullOrEmpty(path); } - catch (Exception ) + catch (Exception ex) { + Logger.LogError(ex.Message); return false; } }); diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Programs/UWPApplication.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Programs/UWPApplication.cs index 7a35400a7a..c38c05d7b5 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Programs/UWPApplication.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Programs/UWPApplication.cs @@ -8,12 +8,14 @@ using System.IO.Abstractions; using System.Linq; using System.Text; using System.Xml; +using ManagedCommon; using Microsoft.CmdPal.Ext.Apps.Commands; using Microsoft.CmdPal.Ext.Apps.Properties; using Microsoft.CmdPal.Ext.Apps.Utils; using Microsoft.CommandPalette.Extensions.Toolkit; using static Microsoft.CmdPal.Ext.Apps.Utils.Native; using PackageVersion = Microsoft.CmdPal.Ext.Apps.Programs.UWP.PackageVersion; +using Theme = Microsoft.CmdPal.Ext.Apps.Utils.Theme; namespace Microsoft.CmdPal.Ext.Apps.Programs; @@ -154,8 +156,9 @@ public class UWPApplication : IProgram return true; } } - catch (Exception) + catch (Exception ex) { + Logger.LogError(ex.Message); } } } diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Programs/Win32Program.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Programs/Win32Program.cs index 48dfaa2f7e..11c9be6be5 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Programs/Win32Program.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Programs/Win32Program.cs @@ -15,6 +15,7 @@ using System.Security; using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Windows.Input; +using ManagedCommon; using Microsoft.CmdPal.Ext.Apps.Commands; using Microsoft.CmdPal.Ext.Apps.Properties; using Microsoft.CmdPal.Ext.Apps.Utils; @@ -239,10 +240,12 @@ public class Win32Program : IProgram } catch (Exception e) when (e is SecurityException || e is UnauthorizedAccessException) { + Logger.LogError(e.Message); return InvalidProgram; } - catch (Exception) + catch (Exception e) { + Logger.LogError(e.Message); return InvalidProgram; } } @@ -317,11 +320,13 @@ public class Win32Program : IProgram } catch (Exception e) when (e is SecurityException || e is UnauthorizedAccessException) { + Logger.LogError(e.Message); return InvalidProgram; } } - catch (Exception) + catch (Exception e) { + Logger.LogError(e.Message); return InvalidProgram; } } @@ -374,15 +379,17 @@ public class Win32Program : IProgram return program; } - catch (System.IO.FileLoadException) + catch (System.IO.FileLoadException e) { + Logger.LogError(e.Message); return InvalidProgram; } // Only do a catch all in production. This is so make developer aware of any unhandled exception and add the exception handling in. // Error caused likely due to trying to get the description of the program - catch (Exception) + catch (Exception e) { + Logger.LogError(e.Message); return InvalidProgram; } } @@ -402,14 +409,17 @@ public class Win32Program : IProgram } catch (Exception e) when (e is SecurityException || e is UnauthorizedAccessException) { + Logger.LogError(e.Message); return InvalidProgram; } - catch (FileNotFoundException) + catch (FileNotFoundException e) { + Logger.LogError(e.Message); return InvalidProgram; } - catch (Exception) + catch (Exception e) { + Logger.LogError(e.Message); return InvalidProgram; } } @@ -515,16 +525,19 @@ public class Win32Program : IProgram { files.AddRange(Directory.EnumerateFiles(currentDirectory, $"*.{suffix}", SearchOption.TopDirectoryOnly)); } - catch (DirectoryNotFoundException) + catch (DirectoryNotFoundException e) { + Logger.LogError(e.Message); } } } catch (Exception e) when (e is SecurityException || e is UnauthorizedAccessException) { + Logger.LogError(e.Message); } - catch (Exception) + catch (Exception e) { + Logger.LogError(e.Message); } try @@ -548,9 +561,11 @@ public class Win32Program : IProgram } catch (Exception e) when (e is SecurityException || e is UnauthorizedAccessException) { + Logger.LogError(e.Message); } - catch (Exception) + catch (Exception e) { + Logger.LogError(e.Message); } } while (folderQueue.Count > 0); @@ -682,6 +697,7 @@ public class Win32Program : IProgram } catch (Exception e) when (e is SecurityException || e is UnauthorizedAccessException) { + Logger.LogError(e.Message); return string.Empty; } } @@ -769,8 +785,9 @@ public class Win32Program : IProgram icoPath = ExpandEnvironmentVariables(redirectionPath); return true; } - catch (IOException) + catch (IOException e) { + Logger.LogError(e.Message); } icoPath = null; @@ -839,8 +856,9 @@ public class Win32Program : IProgram return DeduplicatePrograms(programs.Concat(runCommandPrograms).Where(program => program?.Valid == true)); } - catch (Exception) + catch (Exception e) { + Logger.LogError(e.Message); return Array.Empty(); } } diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Storage/ListRepository`1.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Storage/ListRepository`1.cs index aea8590c58..653663b7e1 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Storage/ListRepository`1.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Storage/ListRepository`1.cs @@ -7,6 +7,7 @@ using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; +using ManagedCommon; namespace Microsoft.CmdPal.Ext.Apps.Storage; @@ -37,8 +38,9 @@ public class ListRepository : IRepository, IEnumerable _items = new ConcurrentDictionary(list.ToDictionary(i => i.GetHashCode())); #pragma warning restore CS8602 // Dereference of a possibly null reference. } - catch (ArgumentException) + catch (ArgumentException ex) { + Logger.LogInfo(ex.Message); } } diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Storage/PackageRepository.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Storage/PackageRepository.cs index 1f7a747d57..566817ea5d 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Storage/PackageRepository.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Storage/PackageRepository.cs @@ -4,8 +4,8 @@ using System; using System.Linq; +using ManagedCommon; using Microsoft.CmdPal.Ext.Apps.Programs; -using Microsoft.CmdPal.Ext.Apps.Storage; using Microsoft.CmdPal.Ext.Apps.Utils; using Windows.ApplicationModel; @@ -93,8 +93,9 @@ internal sealed partial class PackageRepository : ListRepository // InitializeAppInfo will throw if there is no AppxManifest.xml for the package. // Note there are sometimes multiple packages per product and this doesn't necessarily mean that we haven't found the app. // eg. "Could not find file 'C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminalPreview_2020.616.45.0_neutral_~_8wekyb3d8bbwe\\AppxManifest.xml'." - catch (System.IO.FileNotFoundException) + catch (System.IO.FileNotFoundException ex) { + Logger.LogError(ex.Message); } } diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Storage/Win32ProgramFileSystemWatchers.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Storage/Win32ProgramFileSystemWatchers.cs index 6847e619e1..3e992cc807 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Storage/Win32ProgramFileSystemWatchers.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Storage/Win32ProgramFileSystemWatchers.cs @@ -6,6 +6,7 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; +using ManagedCommon; namespace Microsoft.CmdPal.Ext.Apps.Storage; @@ -47,8 +48,9 @@ internal sealed partial class Win32ProgramFileSystemWatchers : IDisposable { Directory.GetFiles(path); } - catch (Exception) + catch (Exception e) { + Logger.LogError(e.Message); invalidPaths.Add(path); } } diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Storage/Win32ProgramRepository.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Storage/Win32ProgramRepository.cs index 5a0eb09451..9592599b17 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Storage/Win32ProgramRepository.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Storage/Win32ProgramRepository.cs @@ -9,6 +9,7 @@ using System.Collections.ObjectModel; using System.IO; using System.IO.Abstractions; using System.Threading.Tasks; +using ManagedCommon; using Microsoft.CmdPal.Ext.Apps.Programs; using Win32Program = Microsoft.CmdPal.Ext.Apps.Programs.Win32Program; @@ -132,8 +133,9 @@ internal sealed partial class Win32ProgramRepository : ListRepository + diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.TimeDate/Helpers/AvailableResultsList.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.TimeDate/Helpers/AvailableResultsList.cs index 60ccaf38b5..ee14fdb855 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.TimeDate/Helpers/AvailableResultsList.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.TimeDate/Helpers/AvailableResultsList.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text.RegularExpressions; +using ManagedCommon; namespace Microsoft.CmdPal.Ext.TimeDate.Helpers; @@ -109,10 +110,11 @@ internal static class AvailableResultsList { value = dtObject.ToString(value, CultureInfo.CurrentCulture); } - catch + catch (Exception ex) { if (!containsCustomSyntax) { + Logger.LogError($"Unable to format date time with format: {value}. Error: {ex.Message}"); throw; } else @@ -133,6 +135,7 @@ internal static class AvailableResultsList } catch (ArgumentOutOfRangeException e) { + Logger.LogError($"ArgumentOutOfRangeException with format: {formatSyntax}. Error: {e.Message}"); results.Add(new AvailableResult() { Value = Resources.Microsoft_plugin_timedate_ErrorConvertCustomFormat, @@ -144,6 +147,7 @@ internal static class AvailableResultsList } catch (Exception e) { + Logger.LogError($"Exception with format: {formatSyntax}. Error: {e.Message}"); results.Add(new AvailableResult() { Value = Resources.Microsoft_plugin_timedate_InvalidCustomFormat + " " + formatSyntax, @@ -325,8 +329,9 @@ internal static class AvailableResultsList IconType = ResultIconType.DateTime, }); } - catch + catch (Exception ex) { + Logger.LogError($"Unable to convert to Windows file time: {ex.Message}"); results.Add(new AvailableResult() { Value = Resources.Microsoft_plugin_timedate_ErrorConvertWft, diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.TimeDate/Helpers/TimeAndDateHelper.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.TimeDate/Helpers/TimeAndDateHelper.cs index 368e20a48e..18cd2b4d9f 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.TimeDate/Helpers/TimeAndDateHelper.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.TimeDate/Helpers/TimeAndDateHelper.cs @@ -6,6 +6,7 @@ using System; using System.Globalization; using System.Text; using System.Text.RegularExpressions; +using ManagedCommon; namespace Microsoft.CmdPal.Ext.TimeDate.Helpers; @@ -166,6 +167,7 @@ internal static class TimeAndDateHelper if (DateTime.TryParse(input, out timestamp)) { // Known date/time format + Logger.LogDebug($"Successfully parsed standard date/time format: '{input}' as {timestamp}"); return true; } else if (Regex.IsMatch(input, @"^u[\+-]?\d+$")) @@ -179,10 +181,12 @@ internal static class TimeAndDateHelper { inputParsingErrorMsg = string.Format(CultureInfo.CurrentCulture, errorMessage, Resources.Microsoft_plugin_timedate_Unix, UnixTimeSecondsMin, UnixTimeSecondsMax); timestamp = new DateTime(1, 1, 1, 1, 1, 1); + Logger.LogError($"Failed to parse unix timestamp: '{input}'. Value out of range."); return false; } timestamp = DateTimeOffset.FromUnixTimeSeconds(secondsU).LocalDateTime; + Logger.LogDebug($"Successfully parsed unix timestamp: '{input}' as {timestamp}"); return true; } else if (Regex.IsMatch(input, @"^ums[\+-]?\d+$")) @@ -196,10 +200,12 @@ internal static class TimeAndDateHelper { inputParsingErrorMsg = string.Format(CultureInfo.CurrentCulture, errorMessage, Resources.Microsoft_plugin_timedate_Unix_Milliseconds, UnixTimeMillisecondsMin, UnixTimeMillisecondsMax); timestamp = new DateTime(1, 1, 1, 1, 1, 1); + Logger.LogError($"Failed to parse unix millisecond timestamp: '{input}'. Value out of range."); return false; } timestamp = DateTimeOffset.FromUnixTimeMilliseconds(millisecondsUms).LocalDateTime; + Logger.LogDebug($"Successfully parsed unix millisecond timestamp: '{input}' as {timestamp}"); return true; } else if (Regex.IsMatch(input, @"^ft\d+$")) @@ -212,11 +218,13 @@ internal static class TimeAndDateHelper { inputParsingErrorMsg = string.Format(CultureInfo.CurrentCulture, errorMessage, Resources.Microsoft_plugin_timedate_WindowsFileTime, WindowsFileTimeMin, WindowsFileTimeMax); timestamp = new DateTime(1, 1, 1, 1, 1, 1); + Logger.LogError($"Failed to parse Windows file time: '{input}'. Value out of range."); return false; } // DateTime.FromFileTime returns as local time. timestamp = DateTime.FromFileTime(secondsFt); + Logger.LogDebug($"Successfully parsed Windows file time: '{input}' as {timestamp}"); return true; } else if (Regex.IsMatch(input, @"^oa[+-]?\d+[,.0-9]*$")) @@ -230,10 +238,12 @@ internal static class TimeAndDateHelper { inputParsingErrorMsg = string.Format(CultureInfo.CurrentCulture, errorMessage, Resources.Microsoft_plugin_timedate_OADate, OADateMin, OADateMax); timestamp = new DateTime(1, 1, 1, 1, 1, 1); + Logger.LogError($"Failed to parse OLE Automation date: '{input}'. Value out of range."); return false; } timestamp = DateTime.FromOADate(oADate); + Logger.LogDebug($"Successfully parsed OLE Automation date: '{input}' as {timestamp}"); return true; } else if (Regex.IsMatch(input, @"^exc[+-]?\d+[,.0-9]*$")) @@ -249,6 +259,7 @@ internal static class TimeAndDateHelper // For the if itself we use 0 as min value that we can show a special message if input is 0. inputParsingErrorMsg = string.Format(CultureInfo.CurrentCulture, errorMessage, Resources.Microsoft_plugin_timedate_Excel1900, Excel1900DateMin, Excel1900DateMax); timestamp = new DateTime(1, 1, 1, 1, 1, 1); + Logger.LogError($"Failed to parse Excel 1900 date value: '{input}'. Value out of range."); return false; } @@ -256,11 +267,13 @@ internal static class TimeAndDateHelper { inputParsingErrorMsg = Resources.Microsoft_plugin_timedate_InvalidInput_FakeExcel1900; timestamp = new DateTime(1, 1, 1, 1, 1, 1); + Logger.LogError($"Failed to parse Excel 1900 date value: '{input}'. Invalid date (0 or 60)."); return false; } excDate = excDate <= 60 ? excDate + 1 : excDate; timestamp = DateTime.FromOADate(excDate); + Logger.LogDebug($"Successfully parsed Excel 1900 date value: '{input}' as {timestamp}"); return true; } else if (Regex.IsMatch(input, @"^exf[+-]?\d+[,.0-9]*$")) @@ -275,15 +288,18 @@ internal static class TimeAndDateHelper { inputParsingErrorMsg = string.Format(CultureInfo.CurrentCulture, errorMessage, Resources.Microsoft_plugin_timedate_Excel1904, Excel1904DateMin, Excel1904DateMax); timestamp = new DateTime(1, 1, 1, 1, 1, 1); + Logger.LogError($"Failed to parse Excel 1904 date value: '{input}'. Value out of range."); return false; } timestamp = DateTime.FromOADate(exfDate + 1462); + Logger.LogDebug($"Successfully parsed Excel 1904 date value: '{input}' as {timestamp}"); return true; } else { timestamp = new DateTime(1, 1, 1, 1, 1, 1); + Logger.LogWarning($"Failed to parse input: '{input}'. Format not recognized."); return false; } } diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.TimeDate/Microsoft.CmdPal.Ext.TimeDate.csproj b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.TimeDate/Microsoft.CmdPal.Ext.TimeDate.csproj index 34301712cf..038629d266 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.TimeDate/Microsoft.CmdPal.Ext.TimeDate.csproj +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.TimeDate/Microsoft.CmdPal.Ext.TimeDate.csproj @@ -19,6 +19,7 @@ + diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Helpers/DefaultBrowserInfo.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Helpers/DefaultBrowserInfo.cs index 473675e32a..b3df3fc492 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Helpers/DefaultBrowserInfo.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Helpers/DefaultBrowserInfo.cs @@ -5,6 +5,7 @@ using System; using System.Text; using System.Threading; +using ManagedCommon; namespace Microsoft.CmdPal.Ext.WebSearch.Helpers; @@ -170,6 +171,7 @@ public static class DefaultBrowserInfo if (!_errorLogged) { // Log.Exception("Exception when retrieving browser path/name. Path and Name are set to use Microsoft Edge.", e, typeof(DefaultBrowserInfo)); + Logger.LogError("Exception when retrieving browser path/name. Path and Name are set to use Microsoft Edge."); _errorLogged = true; } } diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Microsoft.CmdPal.Ext.WebSearch.csproj b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Microsoft.CmdPal.Ext.WebSearch.csproj index 3fbaeb30a7..e4f05fb0e9 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Microsoft.CmdPal.Ext.WebSearch.csproj +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Microsoft.CmdPal.Ext.WebSearch.csproj @@ -10,6 +10,7 @@ + diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowWalker/Microsoft.CmdPal.Ext.WindowWalker.csproj b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowWalker/Microsoft.CmdPal.Ext.WindowWalker.csproj index e346e824c8..f53237e632 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowWalker/Microsoft.CmdPal.Ext.WindowWalker.csproj +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowWalker/Microsoft.CmdPal.Ext.WindowWalker.csproj @@ -13,6 +13,7 @@ + diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsServices/Helpers/ServiceHelper.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsServices/Helpers/ServiceHelper.cs index ca10db6a9c..e5d81caa3c 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsServices/Helpers/ServiceHelper.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsServices/Helpers/ServiceHelper.cs @@ -8,6 +8,7 @@ using System.ComponentModel; using System.Diagnostics; using System.Linq; using System.ServiceProcess; +using ManagedCommon; using Microsoft.CmdPal.Ext.WindowsServices.Commands; using Microsoft.CmdPal.Ext.WindowsServices.Properties; using Microsoft.CommandPalette.Extensions.Toolkit; @@ -147,12 +148,14 @@ public static class ServiceHelper // TODO GH #108 We need to figure out some logging // contextAPI.ShowNotification(GetLocalizedErrorMessage(action), serviceResult.DisplayName); // Log.Error($"The command returned {exitCode}", MethodBase.GetCurrentMethod().DeclaringType); + Logger.LogError($"The command returned {exitCode}"); } } catch (Win32Exception ex) { // TODO GH #108 We need to figure out some logging // Log.Error(ex.Message, MethodBase.GetCurrentMethod().DeclaringType); + Logger.LogError($"Failed to change service '{serviceResult.DisplayName}' status to {action}: {ex.Message}"); } } #pragma warning restore IDE0059, CS0168, SA1005 @@ -173,6 +176,7 @@ public static class ServiceHelper catch (Exception ex) { // TODO GH #108 We need to figure out some logging + Logger.LogError($"Failed to open services.msc: {ex.Message}"); } } #pragma warning restore IDE0059, CS0168, SA1005 diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsServices/Microsoft.CmdPal.Ext.WindowsServices.csproj b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsServices/Microsoft.CmdPal.Ext.WindowsServices.csproj index 9038a2d671..4758b96b71 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsServices/Microsoft.CmdPal.Ext.WindowsServices.csproj +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsServices/Microsoft.CmdPal.Ext.WindowsServices.csproj @@ -17,6 +17,7 @@ + diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsServices/ServiceResult.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsServices/ServiceResult.cs index ff7942a055..5d8740fa62 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsServices/ServiceResult.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsServices/ServiceResult.cs @@ -4,6 +4,7 @@ using System; using System.ServiceProcess; +using ManagedCommon; namespace Microsoft.CmdPal.Ext.WindowsServices; @@ -35,10 +36,11 @@ public class ServiceResult return result; } - catch (Exception) + catch (Exception ex) { // try to log the exception in the future // retrieve properties from serviceController will throw exception. Such as PlatformNotSupportedException. + Logger.LogError($"Failed to create ServiceController: {ex.GetType().Name} - {ex.Message}"); } return null; diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsSettings/Helpers/JsonSettingsListHelper.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsSettings/Helpers/JsonSettingsListHelper.cs index 18b2548ce2..e240c3fadc 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsSettings/Helpers/JsonSettingsListHelper.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsSettings/Helpers/JsonSettingsListHelper.cs @@ -6,6 +6,7 @@ using System; using System.IO; using System.Reflection; using System.Text.Json; +using ManagedCommon; namespace Microsoft.CmdPal.Ext.WindowsSettings.Helpers; @@ -60,6 +61,7 @@ internal static class JsonSettingsListHelper { // TODO GH #108 Logging is something we have to take care of // Log.Exception("Error loading settings JSON file", exception, typeof(JsonSettingsListHelper)); + Logger.LogError($"Error loading settings JSON file: {exception.Message}"); } #pragma warning restore CS0168 return settings ?? new Classes.WindowsSettings(); diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsSettings/Helpers/TranslationHelper.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsSettings/Helpers/TranslationHelper.cs index b5a8c29845..c15159d69b 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsSettings/Helpers/TranslationHelper.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsSettings/Helpers/TranslationHelper.cs @@ -7,6 +7,7 @@ using System.Collections.ObjectModel; using System.Globalization; using System.Linq; +using ManagedCommon; using Microsoft.CmdPal.Ext.WindowsSettings.Properties; namespace Microsoft.CmdPal.Ext.WindowsSettings.Helpers; @@ -36,6 +37,7 @@ internal static class TranslationHelper if (string.IsNullOrEmpty(name)) { // Log.Warn($"Resource string for [{settings.Name}] not found", typeof(TranslationHelper)); + Logger.LogWarning($"Resource string for [{settings.Name}] not found"); } settings.Name = name ?? settings.Name ?? string.Empty; @@ -48,6 +50,7 @@ internal static class TranslationHelper if (string.IsNullOrEmpty(type)) { // Log.Warn($"Resource string for [{settings.Type}] not found", typeof(TranslationHelper)); + Logger.LogWarning($"Resource string for [{settings.Type}] not found"); } settings.Type = type ?? settings.Type ?? string.Empty; @@ -69,6 +72,7 @@ internal static class TranslationHelper if (string.IsNullOrEmpty(translatedArea)) { // Log.Warn($"Resource string for [{area}] not found", typeof(TranslationHelper)); + Logger.LogWarning($"Resource string for [{area}] not found"); } translatedAreas.Add(translatedArea ?? area); @@ -93,6 +97,7 @@ internal static class TranslationHelper if (string.IsNullOrEmpty(translatedAltName)) { // Log.Warn($"Resource string for [{altName}] not found", typeof(TranslationHelper)); + Logger.LogWarning($"Resource string for [{altName}] not found"); } translatedAltNames.Add(translatedAltName ?? altName); @@ -108,6 +113,7 @@ internal static class TranslationHelper if (string.IsNullOrEmpty(note)) { // Log.Warn($"Resource string for [{settings.Note}] not found", typeof(TranslationHelper)); + Logger.LogWarning($"Resource string for [{settings.Note}] not found"); } settings.Note = note ?? settings.Note ?? string.Empty; diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsSettings/Helpers/UnsupportedSettingsHelper.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsSettings/Helpers/UnsupportedSettingsHelper.cs index b0e8a76ae9..9ad75ad561 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsSettings/Helpers/UnsupportedSettingsHelper.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsSettings/Helpers/UnsupportedSettingsHelper.cs @@ -4,6 +4,7 @@ using System; using System.Linq; +using ManagedCommon; namespace Microsoft.CmdPal.Ext.WindowsSettings.Helpers; @@ -40,6 +41,7 @@ internal static class UnsupportedSettingsHelper // TODO GH #108 Logging is something we have to take care of // Log.Warn(warningMessage, typeof(UnsupportedSettingsHelper)); + Logger.LogWarning(warningMessage); } var currentWindowsBuild = currentBuild != uint.MinValue @@ -71,12 +73,9 @@ internal static class UnsupportedSettingsHelper { registryValueData = Win32.Registry.GetValue(registryKey, valueName, uint.MinValue); } - catch + catch (Exception ex) { - // Log.Exception( - // $"Can't get registry value for '{valueName}'", - // exception, - // typeof(UnsupportedSettingsHelper)); + Logger.LogError($"Can't get registry value for '{valueName}' - {ex.Message}"); return uint.MinValue; } diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsSettings/Helpers/WindowsSettingsPathHelper.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsSettings/Helpers/WindowsSettingsPathHelper.cs index d7866d892f..b42b450fc3 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsSettings/Helpers/WindowsSettingsPathHelper.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsSettings/Helpers/WindowsSettingsPathHelper.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Linq; +using ManagedCommon; namespace Microsoft.CmdPal.Ext.WindowsSettings.Helpers; @@ -34,6 +35,7 @@ internal static class WindowsSettingsPathHelper { // TODO GH #108 Logging is something we have to take care of // Log.Warn($"The type property is not set for setting [{settings.Name}] in json. Skipping generating of settings path.", typeof(WindowsSettingsPathHelper)); + Logger.LogWarning($"The type property is not set for setting [{settings.Name}] in json. Skipping generating of settings path."); continue; } @@ -41,12 +43,14 @@ internal static class WindowsSettingsPathHelper if (!string.IsNullOrEmpty(settings.JoinedAreaPath)) { // Log.Debug($"The property [JoinedAreaPath] of setting [{settings.Name}] was filled from the json. This value is not used and will be overwritten.", typeof(WindowsSettingsPathHelper)); + Logger.LogDebug($"The property [JoinedAreaPath] of setting [{settings.Name}] was filled from the json. This value is not used and will be overwritten."); } if (!string.IsNullOrEmpty(settings.JoinedFullSettingsPath)) { // TODO GH #108 Logging is something we have to take care of // Log.Debug($"The property [JoinedFullSettingsPath] of setting [{settings.Name}] was filled from the json. This value is not used and will be overwritten.", typeof(WindowsSettingsPathHelper)); + Logger.LogDebug($"The property [JoinedFullSettingsPath] of setting [{settings.Name}] was filled from the json. This value is not used and will be overwritten."); } // Generating path values. diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsSettings/Microsoft.CmdPal.Ext.WindowsSettings.csproj b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsSettings/Microsoft.CmdPal.Ext.WindowsSettings.csproj index 9f2d72bc8a..58eb164ca0 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsSettings/Microsoft.CmdPal.Ext.WindowsSettings.csproj +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsSettings/Microsoft.CmdPal.Ext.WindowsSettings.csproj @@ -20,6 +20,7 @@ + diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsTerminal/Commands/LaunchProfileAsAdminCommand.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsTerminal/Commands/LaunchProfileAsAdminCommand.cs index fd8354495a..39155115ca 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsTerminal/Commands/LaunchProfileAsAdminCommand.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsTerminal/Commands/LaunchProfileAsAdminCommand.cs @@ -9,6 +9,7 @@ using System.Linq; using System.Resources; using System.Text; using System.Threading.Tasks; +using ManagedCommon; using Microsoft.CmdPal.Ext.WindowsTerminal.Helpers; using Microsoft.CmdPal.Ext.WindowsTerminal.Properties; using Microsoft.CommandPalette.Extensions; @@ -60,6 +61,7 @@ internal sealed partial class LaunchProfileAsAdminCommand : InvokableCommand //var message = Resources.run_terminal_failed; //Log.Exception("Failed to open Windows Terminal", ex, GetType()); //_context.API.ShowMsg(name, message, string.Empty); + Logger.LogError($"Failed to open Windows Terminal: {ex.Message}"); } } #pragma warning restore IDE0059, CS0168, SA1005 @@ -81,6 +83,7 @@ internal sealed partial class LaunchProfileAsAdminCommand : InvokableCommand // var message = Resources.run_terminal_failed; // Log.Exception("Failed to open Windows Terminal", ex, GetType()); // _context.API.ShowMsg(name, message, string.Empty); + Logger.LogError($"Failed to open Windows Terminal: {ex.Message}"); } } #pragma warning restore IDE0059, CS0168 @@ -94,6 +97,7 @@ internal sealed partial class LaunchProfileAsAdminCommand : InvokableCommand catch { // TODO GH #108 We need to figure out some logging + // No need to log here, as the exception is already logged in LaunchElevated } return CommandResult.Dismiss(); diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsTerminal/Commands/LaunchProfileCommand.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsTerminal/Commands/LaunchProfileCommand.cs index 25124fb33c..a879dc2410 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsTerminal/Commands/LaunchProfileCommand.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsTerminal/Commands/LaunchProfileCommand.cs @@ -9,6 +9,7 @@ using System.Linq; using System.Resources; using System.Text; using System.Threading.Tasks; +using ManagedCommon; using Microsoft.CmdPal.Ext.WindowsTerminal.Helpers; using Microsoft.CmdPal.Ext.WindowsTerminal.Properties; using Microsoft.CommandPalette.Extensions; @@ -52,6 +53,7 @@ internal sealed partial class LaunchProfileCommand : InvokableCommand // var message = Resources.run_terminal_failed; // Log.Exception("Failed to open Windows Terminal", ex, GetType()); // _context.API.ShowMsg(name, message, string.Empty); + Logger.LogError($"Failed to open Windows Terminal: {ex.Message}"); } } #pragma warning restore IDE0059, CS0168 @@ -65,6 +67,7 @@ internal sealed partial class LaunchProfileCommand : InvokableCommand catch { // TODO GH #108 We need to figure out some logging + // No need to log here, as the exception is already logged in the Launch method } return CommandResult.Dismiss(); diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsTerminal/Helpers/TerminalQuery.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsTerminal/Helpers/TerminalQuery.cs index 088c488ad3..0665004018 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsTerminal/Helpers/TerminalQuery.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsTerminal/Helpers/TerminalQuery.cs @@ -8,7 +8,7 @@ using System.Collections.ObjectModel; using System.IO; using System.Linq; using System.Security.Principal; - +using ManagedCommon; using Windows.Management.Deployment; // using Wox.Plugin.Logger; @@ -41,6 +41,7 @@ public class TerminalQuery : ITerminalQuery { // TODO: what kind of logging should we do? // Log.Warn($"No Windows Terminal packages installed", typeof(TerminalQuery)); + Logger.LogWarning("No Windows Terminal packages installed"); } foreach (var terminal in Terminals) @@ -49,6 +50,7 @@ public class TerminalQuery : ITerminalQuery { // TODO: what kind of logging should we do? // Log.Warn($"Failed to find settings file {terminal.SettingsPath}", typeof(TerminalQuery)); + Logger.LogWarning($"Failed to find settings file {terminal.SettingsPath}"); continue; } diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsTerminal/Microsoft.CmdPal.Ext.WindowsTerminal.csproj b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsTerminal/Microsoft.CmdPal.Ext.WindowsTerminal.csproj index 1c09c35c5d..e3ba9e6d46 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsTerminal/Microsoft.CmdPal.Ext.WindowsTerminal.csproj +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsTerminal/Microsoft.CmdPal.Ext.WindowsTerminal.csproj @@ -15,6 +15,7 @@ + diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsTerminal/TerminalPackage.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsTerminal/TerminalPackage.cs index 08f95c04fa..1b2cec7e3d 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsTerminal/TerminalPackage.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowsTerminal/TerminalPackage.cs @@ -4,6 +4,7 @@ using System; using System.IO; +using ManagedCommon; using Microsoft.UI.Xaml.Media.Imaging; // using Wox.Infrastructure.Image; @@ -43,6 +44,7 @@ public class TerminalPackage { // Not using wox anymore, TODO: find the right new way to handle this // image.UriSource = new Uri(ImageLoader.ErrorIconPath); + Logger.LogError($"Logo file not found: {LogoPath}"); } return image; diff --git a/src/modules/registrypreview/RegistryPreview.FuzzTests/OneFuzzConfig.json b/src/modules/registrypreview/RegistryPreview.FuzzTests/OneFuzzConfig.json index a074f41123..db58123701 100644 --- a/src/modules/registrypreview/RegistryPreview.FuzzTests/OneFuzzConfig.json +++ b/src/modules/registrypreview/RegistryPreview.FuzzTests/OneFuzzConfig.json @@ -20,7 +20,7 @@ "org": "microsoft", "project": "OS", "AssignedTo": "mengyuanchen@microsoft.com", - "AreaPath": "OS\\Windows Client and Services\\WinPD\\DEEP-Developer Experience, Ecosystem and Partnerships\\SHINE\\PowerToys", + "AreaPath": "OS\\Windows Client and Services\\WinPD\\DEEP-Developer Experience, Ecosystem and Partnerships\\DIVE\\SALT", "IterationPath": "OS\\Future" }, "jobNotificationEmail": "mengyuanchen@microsoft.com", @@ -61,7 +61,7 @@ "org": "microsoft", "project": "OS", "AssignedTo": "mengyuanchen@microsoft.com", - "AreaPath": "OS\\Windows Client and Services\\WinPD\\DEEP-Developer Experience, Ecosystem and Partnerships\\SHINE\\PowerToys", + "AreaPath": "OS\\Windows Client and Services\\WinPD\\DEEP-Developer Experience, Ecosystem and Partnerships\\DIVE\\SALT", "IterationPath": "OS\\Future" }, "jobNotificationEmail": "mengyuanchen@microsoft.com",