/[xmltv_parser]/trunk/GBPVRProgramDatabaseFixer/Program.cs
ViewVC logotype

Diff of /trunk/GBPVRProgramDatabaseFixer/Program.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/GBPVRProgramDatabaseFixer/Program.cs	2015/04/04 00:16:43	271
+++ trunk/GBPVRProgramDatabaseFixer/Program.cs	2015/04/04 00:27:55	272
@@ -1,6 +1,9 @@
 #define OVERRIDE_COMMANDLINE_ARGUMENTS // when defined will override supplied commandline args
 //#define ENABLE_SCHEDULDED_RECORDINGS_FIXUP // when defined will enable calls to CheckScheduledRecordingsForDiscrepancies
 
+#if DEBUG
+//#define ENABLE_VERBOSE_DEBUG_WHEN_DEBUGGING // when defined and debugging will enable verbose debug log messages
+#endif
 using System;
 using System.Collections.Generic;
 using System.Text;
@@ -22,7 +25,7 @@
         {
             if (!log_file.Exists)
             {
-                gLog.CreateLog(log_file.FullName, false, LogLevel.kLogLevel_All);
+                gLog.CreateLog(log_file.FullName, false, LogLevel.kLogLevel_All, new LogWriter.LogStream());
             }
             else
             {
@@ -37,11 +40,11 @@
                     {
                         File.Copy(log_file.FullName, string.Format("{0}.{1}", log_file.FullName, count));
                     }
-                    gLog.CreateLog(log_file.FullName, true, LogLevel.kLogLevel_All);
+                    gLog.CreateLog(log_file.FullName, true, LogLevel.kLogLevel_All, new LogWriter.LogStream());
                 }
                 else
                 {
-                    gLog.CreateLog(log_file.FullName, false, LogLevel.kLogLevel_All);
+                    gLog.CreateLog(log_file.FullName, false, LogLevel.kLogLevel_All, new LogWriter.LogStream());
                 }
             }
         }
@@ -71,7 +74,11 @@
             TruncateLogFile(log_file);
 #if DEBUG
             LogLevel gLevel = gLog.LogLevel;
+#if ENABLE_VERBOSE_DEBUG_WHEN_DEBUGGING
             gLevel |= LogLevel.kLogLevel_VerboseDebug;
+#else
+            gLevel = gLevel & ~LogLevel.kLogLevel_VerboseDebug;
+#endif
             gLevel |= LogLevel.kLogLevel_Debug;
             gLog.SetLogLevel(gLevel);
 #else
@@ -134,17 +141,17 @@
 
         static void gLog_ReportProgress(object sender, ReportProgressEventArgs e)
         {
-            object k = e.UserState; // we will assum that is a status message
-            if (k == null) // assume we do not have a user status message (ie: is only a progress message)
-            {
-                if (sender == null) { ConsoleOverwritePreviosLine("Progress: {0} ", e.Progress); }
-                else { ConsoleOverwritePreviosLine("{0}: Progress: {1:00}%", sender.GetType().Name, e.Progress); }
-            }
-            else // assume we have a user status message
-            {
-                if (sender == null) { ConsoleOverwritePreviosLine("{0} ", k.ToString()); }
-                else { ConsoleOverwritePreviosLine("{0}: {1}", sender.GetType().Name, k.ToString()); }
-            }
+            //object k = e.UserState; // we will assum that is a status message
+            //if (k == null) // assume we do not have a user status message (ie: is only a progress message)
+            //{
+            //    if (sender == null) { ConsoleOverwritePreviosLine("Progress: {0} ", e.Progress); }
+            //    else { ConsoleOverwritePreviosLine("{0}: Progress: {1:00}%", sender.GetType().Name, e.Progress); }
+            //}
+            //else // assume we have a user status message
+            //{
+            //    if (sender == null) { ConsoleOverwritePreviosLine("{0} ", k.ToString()); }
+            //    else { ConsoleOverwritePreviosLine("{0}: {1}", sender.GetType().Name, k.ToString()); }
+            //}
         }
         static void LoadXMLTVFile()
         {

 

  ViewVC Help
Powered by ViewVC 1.1.22