0
0
Fork 0
mirror of https://github.com/Sanae6/SmoOnlineServer.git synced 2024-11-21 10:45:14 +00:00

Add date to log messages

This commit is contained in:
ecumber 2022-06-20 04:04:30 -07:00 committed by Sanae
parent b5825b537f
commit 67449ffa54
2 changed files with 3 additions and 1 deletions

1
.gitignore vendored
View file

@ -5,3 +5,4 @@ riderModule.iml
/_ReSharper.Caches/
.idea/
settings.json
.vs/

View file

@ -34,8 +34,9 @@ public class Logger {
static Logger() {
AddLogHandler((source, level, text, color) => {
DateTime logtime = DateTime.Now;
Console.ForegroundColor = color;
Console.Write(PrefixNewLines(text, $"{level} [{source}]"));
Console.Write(PrefixNewLines(text, $"{{{logtime}}} {level} [{source}]"));
});
}
}