Skip to content

Commit

Permalink
This should correct unix line endings (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicMaas authored Sep 15, 2022
1 parent 840a3c6 commit 51c638c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/api/Log.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class Log
public bool LogDebug { get; set; }
public readonly string CurrentLogFile;

private const string Layout = "[{0}] [{1}] {2}\r\n";
private const string Layout = "[{0}] [{1}] {2}";
private const int KeepLogFiles = 5;
private readonly FileStream _fileStream;

Expand All @@ -38,10 +38,12 @@ public Log(string localApplicationData)
{
_fileStream.Dispose();
}

private void Write(string message, string level)
{
message = string.Format(Layout, DateTime.Now.ToString("HH:mm:ss.ffff"), level, message);
message += Environment.NewLine;

byte[] info = new UTF8Encoding(true).GetBytes(message);
_fileStream.Write(info, 0, info.Length);
_fileStream.Flush();
Expand Down

0 comments on commit 51c638c

Please sign in to comment.