[PT Run] Improve logs (#9518)

* Improved some aspects, more work left

* Fix Log being called instead of building a string

* Address PR comments

* Okay, spell checker
This commit is contained in:
Ivan Stošić
2021-02-09 14:54:39 +01:00
committed by GitHub
parent 9c6dfd493c
commit c8f0492353
8 changed files with 35 additions and 30 deletions

View File

@@ -52,12 +52,12 @@ namespace Microsoft.Plugin.Program
var a = Task.Run(() =>
{
Stopwatch.Normal("|Microsoft.Plugin.Program.Main|Win32Program index cost", _win32ProgramRepository.IndexPrograms);
Stopwatch.Normal("Microsoft.Plugin.Program.Main - Win32Program index cost", _win32ProgramRepository.IndexPrograms);
});
var b = Task.Run(() =>
{
Stopwatch.Normal("|Microsoft.Plugin.Program.Main|Package index cost", _packageRepository.IndexPrograms);
Stopwatch.Normal("Microsoft.Plugin.Program.Main - Package index cost", _packageRepository.IndexPrograms);
});
Task.WaitAll(a, b);

View File

@@ -169,7 +169,7 @@ namespace Microsoft.Plugin.Program.Programs
}
catch (Exception e)
{
Log.Exception($"|Failed to fetch description for {target}, {e.Message}", e, GetType());
Log.Exception($"Failed to fetch description for {target}, {e.Message}", e, GetType());
Description = string.Empty;
}