mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
Improve logging for PT Run (#6800)
* init code pass * adjusting tabbing for readabilty * few small adjustments
This commit is contained in:
@@ -53,7 +53,7 @@ namespace Microsoft.Plugin.Program.Storage
|
||||
// eg. "Could not find file 'C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminalPreview_2020.616.45.0_neutral_~_8wekyb3d8bbwe\\AppxManifest.xml'."
|
||||
catch (System.IO.FileNotFoundException e)
|
||||
{
|
||||
ProgramLogger.LogException($"|UWP|OnPackageInstalling|{args.Package.InstalledLocation}|{e.Message}", e);
|
||||
ProgramLogger.Exception(e.Message, e, GetType(), args.Package.InstalledLocation.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -66,6 +66,7 @@ namespace Microsoft.Plugin.Program.Storage
|
||||
var packageWrapper = PackageWrapper.GetWrapperFromPackage(args.Package);
|
||||
var uwp = new UWP(packageWrapper);
|
||||
var apps = Items.Where(a => a.Package.Equals(uwp)).ToArray();
|
||||
|
||||
foreach (var app in apps)
|
||||
{
|
||||
Remove(app);
|
||||
|
||||
@@ -94,7 +94,7 @@ namespace Microsoft.Plugin.Program.Storage
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Info($"|Win32ProgramRepository|OnAppRenamed-{extension}Program|{oldPath}|Unable to create program from {oldPath}| {ex.Message}");
|
||||
Log.Exception($"OnAppRenamed-{extension}Program|{oldPath}|Unable to create program from {oldPath}", ex, GetType());
|
||||
}
|
||||
|
||||
// To remove the old app which has been renamed and to add the new application.
|
||||
@@ -134,7 +134,7 @@ namespace Microsoft.Plugin.Program.Storage
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Info($"|Win32ProgramRepository|OnAppDeleted-{extension}Program|{path}|Unable to create program from {path}| {ex.Message}");
|
||||
Log.Exception($"OnAppDeleted-{extension}Program|{path}|Unable to create program from {path}", ex, GetType());
|
||||
}
|
||||
|
||||
if (app != null)
|
||||
|
||||
Reference in New Issue
Block a user