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 827 by william, Tue Apr 15 15:58:50 2014 UTC vs.
Revision 828 by william, Mon Sep 15 21:36:20 2014 UTC

# Line 33 | Line 33 | namespace RomCheater.Logging
33  
34  
35      #region loggerflags
36 +    //[Obsolete("logging is being replaced by Enterprise.Logging.gLog")]
37      internal class loggerflagsbase<TValue>
38          where TValue : IConvertible
39      {
# Line 179 | Line 180 | namespace RomCheater.Logging
180          public TValue Value { get { return CurrentValue.Value; } }
181      }
182      //[Flags]
183 +    //[Obsolete("logging is being replaced by Enterprise.Logging.gLog")]
184      internal class loggerflags : loggerflagsbase<ushort>
185      {
186          protected loggerflags() : base() { }
# Line 195 | Line 197 | namespace RomCheater.Logging
197      }
198      #endregion
199  
200 <    #region public static class logger
200 >    #region public static class logger  
201 >    [Obsolete("logging is being replaced by Enterprise.Logging.gLog")]
202      internal static class logger
203      {
204          private static string GetLoggingClass()
# Line 369 | Line 372 | namespace RomCheater.Logging
372      #endregion
373  
374      #region internal static class Logger
375 +    [Obsolete("logging is being replaced by Enterprise.Logging.gLog")]
376      internal static class xlogger
377      {
378          private static logwriter lh;
# Line 425 | Line 429 | namespace RomCheater.Logging
429      #endregion
430  
431      #region internal class LogHelper : ILogger
432 +    [Obsolete("logging is being replaced by Enterprise.Logging.gLog")]
433      internal class logwriter //: ILogger
434      {
435          private LogWriter writer;
# Line 446 | Line 451 | namespace RomCheater.Logging
451          }
452          private void WriteToLog(string format, bool newline, params object[] args)
453          {
454 <            TextWriter tw = TextWriter.Synchronized(writer.Log);
455 <            if (writer != null)
456 <            {
457 <                if (newline)
458 <                {
459 <                    if (args.Length == 0)
460 <                    {
461 <                        tw.WriteLine(format.Replace("{", "{{").Replace("}", "}}"), args);
462 <                        return;
463 <                    }
464 <                    tw.WriteLine(format, args);
465 <                }
466 <                else
467 <                {
468 <                    if (args.Length == 0)
469 <                    {
470 <                        tw.Write(format.Replace("{", "{{").Replace("}", "}}"), args);
471 <                        return;
472 <                    }
473 <                    tw.Write(format, args);
474 <                }
475 <            }
476 <            tw.Flush();
454 >            //TextWriter tw = TextWriter.Synchronized(writer.Log);
455 >            //if (writer != null)
456 >            //{
457 >            //    if (newline)
458 >            //    {
459 >            //        if (args.Length == 0)
460 >            //        {
461 >            //            tw.WriteLine(format.Replace("{", "{{").Replace("}", "}}"), args);
462 >            //            return;
463 >            //        }
464 >            //        tw.WriteLine(format, args);
465 >            //    }
466 >            //    else
467 >            //    {
468 >            //        if (args.Length == 0)
469 >            //        {
470 >            //            tw.Write(format.Replace("{", "{{").Replace("}", "}}"), args);
471 >            //            return;
472 >            //        }
473 >            //        tw.Write(format, args);
474 >            //    }
475 >            //}
476 >            //tw.Flush();
477          }
478          #endregion
479      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines