/[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 302 by william, Tue Jun 5 13:27:40 2012 UTC revision 391 by william, Wed Jun 20 10:02:14 2012 UTC
# Line 128  namespace RomCheater.Logging Line 128  namespace RomCheater.Logging
128          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"));
129          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"));
130          public static EnumNameValuePair<TValue> WARN = new EnumNameValuePair<TValue>("WARN", Binary<TValue>.ToValue("100000"));          public static EnumNameValuePair<TValue> WARN = new EnumNameValuePair<TValue>("WARN", Binary<TValue>.ToValue("100000"));
131            public static EnumNameValuePair<TValue> PROFILER = new EnumNameValuePair<TValue>("PROFILER", Binary<TValue>.ToValue("1000000"));
132          public static EnumNameValuePair<TValue> DEFAULT = new EnumNameValuePair<TValue>("DEFAULT", EnumNameValuePair<TValue>.bitwise_or(INFO, DEBUG, ERROR, WARN));          public static EnumNameValuePair<TValue> DEFAULT = new EnumNameValuePair<TValue>("DEFAULT", EnumNameValuePair<TValue>.bitwise_or(INFO, DEBUG, ERROR, WARN));
133          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, PROFILER));
134          #endregion          #endregion
135    
136          protected static Dictionary<TValue, EnumNameValuePair<TValue>> value_pairs;          protected static Dictionary<TValue, EnumNameValuePair<TValue>> value_pairs;
# Line 224  namespace RomCheater.Logging Line 225  namespace RomCheater.Logging
225              public static void Write(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.VERBOSE_ERROR)) { xlogger.Write(CreateNewFormat(format), args); } }              public static void Write(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.VERBOSE_ERROR)) { xlogger.Write(CreateNewFormat(format), args); } }
226              public static void WriteLine(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.VERBOSE_ERROR)) { xlogger.WriteLine(CreateNewFormat(format), args); } }              public static void WriteLine(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.VERBOSE_ERROR)) { xlogger.WriteLine(CreateNewFormat(format), args); } }
227          }          }
228            public static class Profiler
229            {
230                private static string CreateNewFormat(string format) { return "    " + CreateTimeStamp() + "(PROFILER) " + format; }
231                public static void Write(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.PROFILER)) { xlogger.Write(CreateNewFormat(format), args); } }
232                public static void WriteLine(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.PROFILER)) { xlogger.WriteLine(CreateNewFormat(format), args); } }
233            }
234          #region Force logging          #region Force logging
235          public static class ForceLog          public static class ForceLog
236          {          {
# Line 251  namespace RomCheater.Logging Line 258  namespace RomCheater.Logging
258                  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); }
259                  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); }
260              }              }
261                public static class Profiler
262                {
263                    private static string CreateNewFormat(string format) { return "    " + CreateTimeStamp() + "(FORCED PROFILER) " + format; }
264                    public static void Write(string format, params object[] args) { xlogger.Write(CreateNewFormat(format), args); }
265                    public static void WriteLine(string format, params object[] args) { xlogger.WriteLine(CreateNewFormat(format), args); }
266                }
267          }          }
268          #endregion          #endregion
269          #endregion          #endregion

Legend:
Removed from v.302  
changed lines
  Added in v.391

  ViewVC Help
Powered by ViewVC 1.1.22