Add extra logging

This commit is contained in:
2024-03-07 21:08:48 -05:00
parent f2e0a38885
commit 47ab58b51d
2 changed files with 9 additions and 1 deletions

View File

@@ -67,7 +67,15 @@ namespace Watchdog
{
if(!managedProcess.IsRunning())
{
bool success=managedProcess.Run();
bool success=false;
try
{
success=managedProcess.Run();
}
catch(Exception exception)
{
eventLog.WriteEntry(String.Format("Exception attempting to start {0}. Exception was {1}",managedProcess.Name,exception.ToString()));
}
eventLog.WriteEntry(String.Format("Process '{0}' was started with {1}",managedProcess.Name,success?"success":"failure"));
}
else

Binary file not shown.