/[RomCheater]/trunk/RomCheater.Logging/logger.cs
ViewVC logotype

Diff of /trunk/RomCheater.Logging/logger.cs

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

--- trunk/RomCheater.Logging/logger.cs	2013/06/17 08:58:58	685
+++ trunk/RomCheater.Logging/logger.cs	2013/06/17 10:29:30	692
@@ -59,6 +59,8 @@
             add_dict_entry(ERROR);
             add_dict_entry(VERBOSE_DEBUG);
             add_dict_entry(VERBOSE_ERROR);
+            add_dict_entry(WARN);
+            add_dict_entry(PROFILER);
             add_dict_entry(DEFAULT);
             add_dict_entry(ALL);
         }
@@ -145,8 +147,8 @@
         public static EnumNameValuePair<TValue> VERBOSE_ERROR = new EnumNameValuePair<TValue>("VERBOSE_ERROR", Binary<TValue>.ToValue("10000"));
         public static EnumNameValuePair<TValue> WARN = new EnumNameValuePair<TValue>("WARN", Binary<TValue>.ToValue("100000"));
         public static EnumNameValuePair<TValue> PROFILER = new EnumNameValuePair<TValue>("PROFILER", Binary<TValue>.ToValue("1000000"));
-        public static EnumNameValuePair<TValue> DEFAULT = new EnumNameValuePair<TValue>("DEFAULT", EnumNameValuePair<TValue>.bitwise_or(INFO, DEBUG, ERROR, WARN));
-        public static EnumNameValuePair<TValue> ALL = new EnumNameValuePair<TValue>("ALL", EnumNameValuePair<TValue>.bitwise_or(DEFAULT, VERBOSE_DEBUG, VERBOSE_ERROR, PROFILER));
+        public static EnumNameValuePair<TValue> DEFAULT = new EnumNameValuePair<TValue>("DEFAULT", EnumNameValuePair<TValue>.bitwise_or(INFO, ERROR, WARN));
+        public static EnumNameValuePair<TValue> ALL = new EnumNameValuePair<TValue>("ALL", EnumNameValuePair<TValue>.bitwise_or(DEFAULT,DEBUG, VERBOSE_DEBUG, VERBOSE_ERROR, PROFILER));
         #endregion
 
         protected static Dictionary<TValue, EnumNameValuePair<TValue>> value_pairs;
@@ -271,58 +273,58 @@
         public static class Info
         {
             private static string CreateNewFormat(string format) { return "    " + CreateTimeStamp() + "(INFO) " + GetLoggingClass() + " " + format; }
-            [Conditional("LOGGING_ENABLE_INFO")]
+            //[Conditional("LOGGING_ENABLE_INFO")]
             public static void Write(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.INFO)) { xlogger.Write(CreateNewFormat(format), args); } }
-            [Conditional("LOGGING_ENABLE_INFO")]
+            //[Conditional("LOGGING_ENABLE_INFO")]
             public static void WriteLine(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.INFO)) { xlogger.WriteLine(CreateNewFormat(format), args); } }
         }
         public static class Warn
         {
             private static string CreateNewFormat(string format) { return "    " + CreateTimeStamp() + "(WARN) " + GetLoggingClass() + " " + format; }
-            [Conditional("LOGGING_ENABLE_WARN")]
+            //[Conditional("LOGGING_ENABLE_WARN")]
             public static void Write(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.WARN)) { xlogger.Write(CreateNewFormat(format), args); } }
-            [Conditional("LOGGING_ENABLE_WARN")]
+            //[Conditional("LOGGING_ENABLE_WARN")]
             public static void WriteLine(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.WARN)) { xlogger.WriteLine(CreateNewFormat(format), args); } }
         }
         public static class Debug
         {
             private static string CreateNewFormat(string format) { return "    " + CreateTimeStamp() + "(DEBUG) " + GetLoggingClass() + " " + format; }
-            [Conditional("LOGGING_ENABLE_DEBUG")]
+            //[Conditional("LOGGING_ENABLE_DEBUG")]
             public static void Write(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.DEBUG)) { xlogger.Write(CreateNewFormat(format), args); } }
-            [Conditional("LOGGING_ENABLE_DEBUG")]
+            //[Conditional("LOGGING_ENABLE_DEBUG")]
             public static void WriteLine(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.DEBUG)) { xlogger.WriteLine(CreateNewFormat(format), args); } }
         }
         public static class VerboseDebug
         {
             private static string CreateNewFormat(string format) { return "    " + CreateTimeStamp() + "(VERBOSE DEBUG) " + GetLoggingClass() + " " + format; }
-            [Conditional("LOGGING_ENABLE_VERBOSEDEBUG")]
+            //[Conditional("LOGGING_ENABLE_VERBOSEDEBUG")]
             public static void Write(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.VERBOSE_DEBUG)) { xlogger.Write(CreateNewFormat(format), args); } }
-            [Conditional("LOGGING_ENABLE_VERBOSEDEBUG")]
+            //[Conditional("LOGGING_ENABLE_VERBOSEDEBUG")]
 
             public static void WriteLine(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.VERBOSE_DEBUG)) { xlogger.WriteLine(CreateNewFormat(format), args); } }
         }
         public static class Error
         {
             private static string CreateNewFormat(string format) { return "    " + CreateTimeStamp() + "(ERROR) " + GetLoggingClass() + " " + format; }
-            [Conditional("LOGGING_ENABLE_ERROR")]
+            //[Conditional("LOGGING_ENABLE_ERROR")]
             public static void Write(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.ERROR)) { xlogger.Write(CreateNewFormat(format), args); } }
-            [Conditional("LOGGING_ENABLE_ERROR")]
+            //[Conditional("LOGGING_ENABLE_ERROR")]
             public static void WriteLine(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.ERROR)) { xlogger.WriteLine(CreateNewFormat(format), args); } }
         }
         public static class VerboseError
         {
             private static string CreateNewFormat(string format) { return "    " + CreateTimeStamp() + "(VERBOSE ERROR) " + GetLoggingClass() + " " + format; }
-            [Conditional("LOGGING_ENABLE_VERBOSEERROR")]
+            //[Conditional("LOGGING_ENABLE_VERBOSEERROR")]
             public static void Write(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.VERBOSE_ERROR)) { xlogger.Write(CreateNewFormat(format), args); } }
-            [Conditional("LOGGING_ENABLE_VERBOSEERROR")]
+            //[Conditional("LOGGING_ENABLE_VERBOSEERROR")]
             public static void WriteLine(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.VERBOSE_ERROR)) { xlogger.WriteLine(CreateNewFormat(format), args); } }
         }
         public static class Profiler
         {
             private static string CreateNewFormat(string format) { return "    " + CreateTimeStamp() + "(PROFILER) " + GetLoggingClass() + " " + format; }
-            [Conditional("LOGGING_ENABLE_PROFILER")]
+            //[Conditional("LOGGING_ENABLE_PROFILER")]
             public static void Write(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.PROFILER)) { xlogger.Write(CreateNewFormat(format), args); } }
-            [Conditional("LOGGING_ENABLE_PROFILER")]
+            //[Conditional("LOGGING_ENABLE_PROFILER")]
             public static void WriteLine(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.PROFILER)) { xlogger.WriteLine(CreateNewFormat(format), args); } }
         }
         #region Force logging
@@ -372,13 +374,13 @@
         static xlogger() { lh = new logwriter(); }
 
         #region ILogger Members
-        [Conditional("LOGGING_ENABLED")]
+        //[Conditional("LOGGING_ENABLED")]
         public static void Write(string format, params object[] args)
         {
             init();
             lh.Write(format, args);
         }
-        [Conditional("LOGGING_ENABLED")]
+        //[Conditional("LOGGING_ENABLED")]
         public static void WriteLine(string format, params object[] args)
         {
             init();
@@ -431,12 +433,12 @@
             this.writer = writer;
         }
         #region ILogger Members
-         [Conditional("LOGGING_ENABLED")]
+         //[Conditional("LOGGING_ENABLED")]
         public void Write(string format, params object[] args)
         {
             WriteToLog(format, false, args);
         }
-         [Conditional("LOGGING_ENABLED")]
+         //[Conditional("LOGGING_ENABLED")]
         public void WriteLine(string format, params object[] args)
         {
             WriteToLog(format, true, args);

 

  ViewVC Help
Powered by ViewVC 1.1.22