/[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

revision 151 by william, Mon May 28 00:17:16 2012 UTC revision 163 by william, Mon May 28 07:22:19 2012 UTC
# Line 94  namespace RomCheater.Logging Line 94  namespace RomCheater.Logging
94          public static EnumNameValuePair<TValue> ERROR = new EnumNameValuePair<TValue>("ERROR", Binary<TValue>.ToValue("00100"));          public static EnumNameValuePair<TValue> ERROR = new EnumNameValuePair<TValue>("ERROR", Binary<TValue>.ToValue("00100"));
95          public static EnumNameValuePair<TValue> VERBOSE_DEBUG = new EnumNameValuePair<TValue>("VERBOSE_DEBUG", Binary<TValue>.ToValue("01000"));          public static EnumNameValuePair<TValue> VERBOSE_DEBUG = new EnumNameValuePair<TValue>("VERBOSE_DEBUG", Binary<TValue>.ToValue("01000"));
96          public static EnumNameValuePair<TValue> VERBOSE_ERROR = new EnumNameValuePair<TValue>("VERBOSE_ERROR", Binary<TValue>.ToValue("10000"));          public static EnumNameValuePair<TValue> VERBOSE_ERROR = new EnumNameValuePair<TValue>("VERBOSE_ERROR", Binary<TValue>.ToValue("10000"));
97          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"));
98            public static EnumNameValuePair<TValue> DEFAULT = new EnumNameValuePair<TValue>("DEFAULT", EnumNameValuePair<TValue>.bitwise_or(INFO, DEBUG, ERROR, WARN));
99          public static EnumNameValuePair<TValue> ALL = new EnumNameValuePair<TValue>("ALL", EnumNameValuePair<TValue>.bitwise_or(DEFAULT, VERBOSE_DEBUG, VERBOSE_ERROR));          public static EnumNameValuePair<TValue> ALL = new EnumNameValuePair<TValue>("ALL", EnumNameValuePair<TValue>.bitwise_or(DEFAULT, VERBOSE_DEBUG, VERBOSE_ERROR));
100          #endregion          #endregion
101    
# Line 154  namespace RomCheater.Logging Line 155  namespace RomCheater.Logging
155              public static void Write(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.INFO)) { xlogger.Write(CreateNewFormat(format), args); } }              public static void Write(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.INFO)) { xlogger.Write(CreateNewFormat(format), args); } }
156              public static void WriteLine(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.INFO)) { xlogger.WriteLine(CreateNewFormat(format), args); } }              public static void WriteLine(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.INFO)) { xlogger.WriteLine(CreateNewFormat(format), args); } }
157          }          }
158            public static class Warn
159            {
160                private static string CreateNewFormat(string format) { return "    " + CreateTimeStamp() + "(WARN) " + format; }
161                public static void Write(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.WARN)) { xlogger.Write(CreateNewFormat(format), args); } }
162                public static void WriteLine(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.WARN)) { xlogger.WriteLine(CreateNewFormat(format), args); } }
163            }
164          public static class Debug          public static class Debug
165          {          {
166              private static string CreateNewFormat(string format) { return "    " + CreateTimeStamp() + "(DEBUG) " + format; }              private static string CreateNewFormat(string format) { return "    " + CreateTimeStamp() + "(DEBUG) " + format; }
# Line 187  namespace RomCheater.Logging Line 194  namespace RomCheater.Logging
194                  public static void Write(string format, params object[] args) { xlogger.Write(CreateNewFormat(format), args); }                  public static void Write(string format, params object[] args) { xlogger.Write(CreateNewFormat(format), args); }
195                  public static void WriteLine(string format, params object[] args) { xlogger.WriteLine(CreateNewFormat(format), args); }                  public static void WriteLine(string format, params object[] args) { xlogger.WriteLine(CreateNewFormat(format), args); }
196              }              }
197                public static class Warn
198                {
199                    private static string CreateNewFormat(string format) { return "    " + CreateTimeStamp() + "(FORCED Warn) " + format; }
200                    public static void Write(string format, params object[] args) { xlogger.Write(CreateNewFormat(format), args); }
201                    public static void WriteLine(string format, params object[] args) { xlogger.WriteLine(CreateNewFormat(format), args); }
202                }
203              public static class Debug              public static class Debug
204              {              {
205                  private static string CreateNewFormat(string format) { return "    " + CreateTimeStamp() + "(FORCED DEBUG) " + format; }                  private static string CreateNewFormat(string format) { return "    " + CreateTimeStamp() + "(FORCED DEBUG) " + format; }

Legend:
Removed from v.151  
changed lines
  Added in v.163

  ViewVC Help
Powered by ViewVC 1.1.22