Use Logger overloads (#2163)

This commit is contained in:
Charles Gagnon
2023-08-02 13:25:21 -07:00
committed by GitHub
parent dc91e1ecf0
commit 969ac0ed8c
114 changed files with 438 additions and 530 deletions

View File

@@ -28,13 +28,13 @@ namespace Microsoft.SqlTools.Utility
private static void CheckParentStatusLoop(int parentProcessId, int intervalMs)
{
var parent = Process.GetProcessById(parentProcessId);
Logger.Write(TraceEventType.Information, $"Starting thread to check status of parent process. Parent PID: {parent.Id}");
Logger.Information($"Starting thread to check status of parent process. Parent PID: {parent.Id}");
while (true)
{
if (parent.HasExited)
{
var processName = Process.GetCurrentProcess().ProcessName;
Logger.Write(TraceEventType.Information, $"Terminating {processName} process because parent process has exited. Parent PID: {parent.Id}");
Logger.Information($"Terminating {processName} process because parent process has exited. Parent PID: {parent.Id}");
Environment.Exit(0);
}
Thread.Sleep(intervalMs);