From 6f0e5505b0a9ed04bb5d4302f4b2f9efd71a8499 Mon Sep 17 00:00:00 2001
From: Markus Quaritsch <markus.quaritsch@tugraz.at>
Date: Wed, 4 Nov 2015 10:11:33 +0100
Subject: [PATCH] verbosity level, if logging switch to single threaded
 execution

---
 VectoConsole/Program.cs | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/VectoConsole/Program.cs b/VectoConsole/Program.cs
index a9f5200308..34074149a9 100644
--- a/VectoConsole/Program.cs
+++ b/VectoConsole/Program.cs
@@ -30,7 +30,8 @@ Description:
     FILE1.vecto [FILE2.vecto ...]: A list of vecto-job files (with the extension: .vecto). At least one file must be given. Delimited by whitespace.
     -v: Shows verbose information (errors and warnings will be displayed)
 	-vv: Shows more verbose information (infos will be displayed)
-	-vvv: Shows all verbose information (everything, slow!)
+	-vvv: Shows debug messages (slow!)
+	-vvvv: Shows all verbose information (everything, slow!)
     -h: Displays this help.
 
 Examples:
@@ -54,25 +55,33 @@ Examples:
 				var logLevel = LogLevel.Fatal;
 
 				// Fatal > Error > Warn > Info > Debug > Trace
+				bool debugEnabled = false;
 
 				if (args.Contains("-v")) {
 					// display errors, warnings
 					logLevel = LogLevel.Warn;
+					debugEnabled = true;
 				} else if (args.Contains("-vv")) {
-					// also display info and debug
-					logLevel = LogLevel.Debug;
+					// also display info
+					logLevel = LogLevel.Info;
+					debugEnabled = true;
 				} else if (args.Contains("-vvv")) {
+					// display debug messages
+					logLevel = LogLevel.Debug;
+					debugEnabled = true;
+				} else if (args.Contains("-vvvv")) {
 					// display everything!
 					logLevel = LogLevel.Trace;
+					debugEnabled = true;
 				}
 
 				var config = LogManager.Configuration;
-				config.LoggingRules.Add(new LoggingRule("*", logLevel, config.FindTargetByName("ConsoleLogger")));
+				//config.LoggingRules.Add(new LoggingRule("*", logLevel, config.FindTargetByName("ConsoleLogger")));
 				config.LoggingRules.Add(new LoggingRule("*", logLevel, config.FindTargetByName("LogFile")));
 				LogManager.Configuration = config;
 				Trace.Listeners.Add(new ConsoleTraceListener(true));
 
-				args = args.Except(new[] { "-v", "-vv", "-vvv" }).ToArray();
+				args = args.Except(new[] { "-v", "-vv", "-vvv", "-vvvv" }).ToArray();
 
 
 				// if no other arguments given: display usage and terminate
@@ -95,7 +104,7 @@ Examples:
 				}
 
 				Console.WriteLine("Starting simulation runs");
-				jobContainer.Execute();
+				jobContainer.Execute(!debugEnabled);
 
 				Console.CancelKeyPress += (object sender, ConsoleCancelEventArgs e) => {
 					var isCtrlC = e.SpecialKey == ConsoleSpecialKey.ControlC;
-- 
GitLab