Browse Source

Fixed issue #26

The first file open should be append.
Kohsuke Kawaguchi 11 years ago
parent
commit
db9161386e
1 changed files with 2 additions and 2 deletions
  1. 2 2
      LogAppenders.cs

+ 2 - 2
LogAppenders.cs

@@ -162,7 +162,7 @@ namespace winsw
             periodicRollingCalendar.init();
 
             byte[] buf = new byte[1024];
-            FileStream w = new FileStream(BaseLogFileName + "_" + periodicRollingCalendar.format + ext, FileMode.Create);
+            FileStream w = new FileStream(BaseLogFileName + "_" + periodicRollingCalendar.format + ext, FileMode.Append);
             while (true)
             {
                 int len = data.Read(buf, 0, buf.Length);
@@ -316,4 +316,4 @@ namespace winsw
             base.log(outputStream, errorStream);
         }
     }
-}
+}