mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
Nzbdrone.exe file logging
This commit is contained in:
parent
d3f6c685cd
commit
9be08b810e
4 changed files with 42 additions and 12 deletions
|
@ -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"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue