Add extra logging
This commit is contained in:
@@ -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
|
||||
|
||||
BIN
Watchdog.v12.suo
BIN
Watchdog.v12.suo
Binary file not shown.
Reference in New Issue
Block a user