/[xmltv_parser]/trunk/xmltv_parser/main.cs
ViewVC logotype

Diff of /trunk/xmltv_parser/main.cs

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

--- trunk/xmltv_parser/main.cs	2013/03/09 01:28:31	68
+++ trunk/xmltv_parser/main.cs	2013/03/09 01:36:49	69
@@ -1,4 +1,6 @@
-´╗┐using System;
+´╗┐//#define DISABLE_RELEASE_MODE_KLOGLEVEL_DEBUG // when defined will turn off kLogLevel_Debug messages, in release mode
+//#define DISABLE_DEBUG_MODE_KLOGLEVEL_VERBOSE_DEBUG // when defined will turn off kLogLevel_VerboseDebug message, in debug mode
+using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
@@ -28,12 +30,21 @@
             gLog.CreateLog(string.Format(@"{0}\{1}", log_path, log_filename), false, LogLevel.kLogLevel_All_NoProgress, new EventHandler<LoggerOnFlushEventArgs>(Log_OnFlush));
 #if DEBUG
             LogLevel gLevel = gLog.LogLevel;
-            gLevel |= LogLevel.kLogLevel_VerboseDebug; // this slows things down alot
-            gLevel |= LogLevel.kLogLevel_Debug;            
+#if DISABLE_DEBUG_MODE_KLOGLEVEL_VERBOSE_DEBUG
+            gLevel &= ~LogLevel.kLogLevel_VerboseDebug;
+#else
+            gLevel |= LogLevel.kLogLevel_VerboseDebug;
+#endif
+            gLevel |= LogLevel.kLogLevel_Debug;
             gLog.SetLogLevel(gLevel);
 #else
             LogLevel gLevel = LogLevel.kLogLevel_Default; // set the default log level: Info, Warn, Error, Debug
             // it is OK for kLogLevel_Debug to be set in Release mode ... must of the chatty messages are from kLogLevel_VerboseDebug
+#if DISABLE_RELEASE_MODE_KLOGLEVEL_DEBUG
+            gLevel &= ~LogLevel.kLogLevel_Debug;
+#else
+            gLevel |= LogLevel.kLogLevel_Debug;
+#endif
             gLevel &= ~LogLevel.kLogLevel_VerboseDebug; // ensure this is not set            
             gLog.SetLogLevel(gLevel);
 #endif

 

  ViewVC Help
Powered by ViewVC 1.1.22