mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-21 09:35:39 -05:00
Use Logger overloads (#2163)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user