ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/RomCheater.Logging/logger.cs
(Generate patch)

Comparing trunk/RomCheater.Logging/logger.cs (file contents):
Revision 98 by william, Wed May 9 22:48:59 2012 UTC vs.
Revision 99 by william, Wed May 9 23:23:38 2012 UTC

# Line 18 | Line 18 | namespace RomCheater.Logging
18      [Flags]
19      public enum loggerflags :ushort
20      {
21 <        NONE = 0x0000,              // 000
22 <        INFO = 0x0001,              // 001
23 <        DEBUG = 0x0002,             // 010
24 <        ERROR= 0x0004,              // 100
21 >        NONE = 0x0000,              // 00000
22 >        INFO = 0x0001,              // 00001
23 >        DEBUG = 0x0002,             // 00010
24 >        ERROR= 0x0004,              // 00100
25 >        VERBOSE_DEBUG = 0x0008,             // 01000
26 >        VERBOSE_ERROR = 0x0010,             // 10000
27          DEFAULT = INFO | ERROR | DEBUG,
28 <        ALL = DEFAULT,
28 >        ALL = DEFAULT | VERBOSE_DEBUG | VERBOSE_ERROR
29      }
30      public static class logger
31      {
# Line 51 | Line 53 | namespace RomCheater.Logging
53              public static void Write(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.DEBUG)) { xlogger.Write(CreateNewFormat(format), args); } }
54              public static void WriteLine(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.DEBUG)) { xlogger.WriteLine(CreateNewFormat(format), args); } }
55          }
56 +        public static class VerboseDebug
57 +        {
58 +            private static string CreateNewFormat(string format) { return "    " + CreateTimeStamp() + "(VERBOSE DEBUG) " + format; }
59 +            public static void Write(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.VERBOSE_DEBUG)) { xlogger.Write(CreateNewFormat(format), args); } }
60 +            public static void WriteLine(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.VERBOSE_DEBUG)) { xlogger.WriteLine(CreateNewFormat(format), args); } }
61 +        }
62          public static class Error
63          {
64              private static string CreateNewFormat(string format) { return "    " + CreateTimeStamp() + "(ERROR) " + format; }
65              public static void Write(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.ERROR)) { xlogger.Write(CreateNewFormat(format), args); } }
66              public static void WriteLine(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.ERROR)) { xlogger.WriteLine(CreateNewFormat(format), args); } }
67          }
68 +        public static class VerboseError
69 +        {
70 +            private static string CreateNewFormat(string format) { return "    " + CreateTimeStamp() + "(VERBOSE ERROR) " + format; }
71 +            public static void Write(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.VERBOSE_ERROR)) { xlogger.Write(CreateNewFormat(format), args); } }
72 +            public static void WriteLine(string format, params object[] args) { if (logging_flags.HasFlag(loggerflags.VERBOSE_ERROR)) { xlogger.WriteLine(CreateNewFormat(format), args); } }
73 +        }
74          #region Force logging
75          public static class ForceLog
76          {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines