[chronojump] Encoder R methods now use new log system
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Encoder R methods now use new log system
- Date: Tue, 23 Dec 2014 00:44:43 +0000 (UTC)
commit cab5aa223a880d7aea9c1249a001bdae8009d5e3
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Dec 23 01:36:23 2014 +0100
Encoder R methods now use new log system
src/utilEncoder.cs | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/src/utilEncoder.cs b/src/utilEncoder.cs
index 7d74f27..9bcb2ff 100644
--- a/src/utilEncoder.cs
+++ b/src/utilEncoder.cs
@@ -477,7 +477,7 @@ public class UtilEncoder
Process p;
//If output file is not given, R will try to write in the running folder
//in which we may haven't got permissions
-
+
string pBin="";
pinfo = new ProcessStartInfo();
@@ -534,6 +534,9 @@ public class UtilEncoder
pinfo.CreateNoWindow = true;
pinfo.UseShellExecute = false;
+ pinfo.RedirectStandardError = true;
+ pinfo.RedirectStandardOutput = true;
+
//delete output file check(s)
Console.WriteLine("Deleting... " + outputFileCheck);
@@ -555,6 +558,10 @@ public class UtilEncoder
p = new Process();
p.StartInfo = pinfo;
p.Start();
+
+ LogB.Information(p.StandardOutput.ReadToEnd());
+ LogB.Error(p.StandardError.ReadToEnd());
+
p.WaitForExit();
if(outputFileCheck2 == "")
@@ -635,6 +642,8 @@ public class UtilEncoder
pinfo.CreateNoWindow = true;
pinfo.UseShellExecute = false;
+ pinfo.RedirectStandardError = true;
+ pinfo.RedirectStandardOutput = true;
//delete output file check(s)
Console.WriteLine("Deleting... " + outputFileCheck);
@@ -645,6 +654,10 @@ public class UtilEncoder
p = new Process();
p.StartInfo = pinfo;
p.Start();
+
+ LogB.Information(p.StandardOutput.ReadToEnd());
+ LogB.Error(p.StandardError.ReadToEnd());
+
p.WaitForExit();
while ( ! ( File.Exists(outputFileCheck) || CancelRScript) );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]