/[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	2012/05/28 07:12:37	162
+++ trunk/RomCheater.Logging/logger.cs	2012/05/28 07:22:19	163
@@ -94,7 +94,8 @@
         public static EnumNameValuePair<TValue> ERROR = new EnumNameValuePair<TValue>("ERROR", Binary<TValue>.ToValue("00100"));
         public static EnumNameValuePair<TValue> VERBOSE_DEBUG = new EnumNameValuePair<TValue>("VERBOSE_DEBUG", Binary<TValue>.ToValue("01000"));
         public static EnumNameValuePair<TValue> VERBOSE_ERROR = new EnumNameValuePair<TValue>("VERBOSE_ERROR", Binary<TValue>.ToValue("10000"));
-        public static EnumNameValuePair<TValue> DEFAULT = new EnumNameValuePair<TValue>("DEFAULT", EnumNameValuePair<TValue>.bitwise_or(INFO,DEBUG,ERROR));
+        public static EnumNameValuePair<TValue> WARN = new EnumNameValuePair<TValue>("WARN", Binary<TValue>.ToValue("100000"));
+        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));
         #endregion
 
@@ -154,6 +155,12 @@
             public static void Write(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.INFO)) { xlogger.Write(CreateNewFormat(format), args); } }
             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) " + format; }
+            public static void Write(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.WARN)) { xlogger.Write(CreateNewFormat(format), args); } }
+            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) " + format; }
@@ -187,6 +194,12 @@
                 public static void Write(string format, params object[] args) { xlogger.Write(CreateNewFormat(format), args); }
                 public static void WriteLine(string format, params object[] args) { xlogger.WriteLine(CreateNewFormat(format), args); }
             }
+            public static class Warn
+            {
+                private static string CreateNewFormat(string format) { return "    " + CreateTimeStamp() + "(FORCED Warn) " + format; }
+                public static void Write(string format, params object[] args) { xlogger.Write(CreateNewFormat(format), args); }
+                public static void WriteLine(string format, params object[] args) { xlogger.WriteLine(CreateNewFormat(format), args); }
+            }
             public static class Debug
             {
                 private static string CreateNewFormat(string format) { return "    " + CreateTimeStamp() + "(FORCED DEBUG) " + format; }

 

  ViewVC Help
Powered by ViewVC 1.1.22