Skip to content

Commit

Permalink
use international date format
Browse files Browse the repository at this point in the history
  • Loading branch information
blowfishpro committed Jan 10, 2019
1 parent e0c1400 commit 326119b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ModuleManager/Logging/StreamLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ namespace ModuleManager.Logging
{
public class StreamLogger : IBasicLogger, IDisposable
{
private const string DATETIME_FORMAT_STRING = "yyyy-mm-dd HH:mm:ss.fff";

private readonly Stream stream;
private readonly StreamWriter streamWriter;
private bool disposed = false;
Expand Down Expand Up @@ -35,7 +37,7 @@ public void Log(LogType logType, string message)
else
prefix = "UNK";

streamWriter.WriteLine("[{0} {1}] {2}", prefix, DateTime.Now.ToString(), message);
streamWriter.WriteLine("[{0} {1}] {2}", prefix, DateTime.Now.ToString(DATETIME_FORMAT_STRING), message);
}

public void Exception(string message, Exception exception)
Expand Down

0 comments on commit 326119b

Please sign in to comment.