/[RomCheater]/trunk/RomCheater.Logging/LogWriter.cs
ViewVC logotype

Diff of /trunk/RomCheater.Logging/LogWriter.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 18 by william, Wed May 9 08:16:18 2012 UTC revision 20 by william, Wed May 9 08:41:36 2012 UTC
# Line 13  namespace RomCheater.Logging Line 13  namespace RomCheater.Logging
13  {  {
14      public partial class LogWriter : UserControl      public partial class LogWriter : UserControl
15      {      {
16          private const string LOG_FILE = "RomCheater.log";          public const string LOG_FILE = "RomCheater.log";
17          private static string LOG_PATH = string.Format(@"{0}\{1}", Application.StartupPath, LOG_FILE);          private static string LOG_PATH = string.Format(@"{0}\{1}", Application.StartupPath, LOG_FILE);
18    
19          private delegate string OnGetLogText();          private delegate string OnGetLogText();
# Line 144  namespace RomCheater.Logging Line 144  namespace RomCheater.Logging
144              FileStream fs = new FileStream(LOG_PATH, FileMode.Append, FileAccess.Write, FileShare.ReadWrite);              FileStream fs = new FileStream(LOG_PATH, FileMode.Append, FileAccess.Write, FileShare.ReadWrite);
145              StreamWriter writer = new StreamWriter(fs);              StreamWriter writer = new StreamWriter(fs);
146              writer.AutoFlush = true;              writer.AutoFlush = true;
147              writer.Write(value);              if (value == Log.NewLine) { writer.Write(System.Environment.NewLine); }
148                else { writer.Write(value); }
149              writer.Close();              writer.Close();
150              sw.Write(value);              sw.Write(value);
151          }          }

Legend:
Removed from v.18  
changed lines
  Added in v.20

  ViewVC Help
Powered by ViewVC 1.1.22