[chronojump] GetOS is printed on log just one time



commit ef83b397ac4ee82ffcb100b2e6665dbe323b27f1
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu May 28 19:30:26 2015 +0200

    GetOS is printed on log just one time

 src/utilAll.cs |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/utilAll.cs b/src/utilAll.cs
index 39296fa..3b2b768 100644
--- a/src/utilAll.cs
+++ b/src/utilAll.cs
@@ -28,6 +28,8 @@ using System.Reflection; // Read Version
 //we do not use util.cs in mini because it has lot of calls to other files
 public class UtilAll
 {
+       static bool printedOS = false;
+
        public static string ReadVersion() {
                Version version = Assembly.GetExecutingAssembly().GetName().Version;
                return version.ToString();
@@ -56,7 +58,12 @@ public class UtilAll
                        platform = "Unix (MacOSX)";
 
                string osString =  string.Format("{0}, {1}", platform, os.Version);
-               LogB.Information("GetOS: " + osString);
+
+               if(! printedOS) {
+                       LogB.Information("GetOS: " + osString);
+                       printedOS = true;
+               }
+               
                return osString;
        }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]