Nzbdrone.exe file logging

This commit is contained in:
kay.one 2011-12-19 11:07:39 -08:00
commit 9be08b810e
4 changed files with 42 additions and 12 deletions

View file

@ -113,9 +113,29 @@ namespace NzbDrone.Web.UI.Automation
static void StartNzbDrone()
{
Process.Start(Path.Combine(testFolder, "nzbdrone.exe"));
var startInfo = new ProcessStartInfo
{
FileName = Path.Combine(testFolder, "nzbdrone.exe"),
RedirectStandardOutput = true,
UseShellExecute = false
};
var nzbDroneProcess = new Process
{
StartInfo = startInfo
};
nzbDroneProcess.OutputDataReceived +=
delegate(object o, DataReceivedEventArgs args)
{
Console.WriteLine(args.Data);
};
nzbDroneProcess.Start();
}
public static void StopNzbDrone()
{
foreach (var process in Process.GetProcessesByName("nzbdrone"))