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:
parent
b5825b537f
commit
67449ffa54
2 changed files with 3 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,3 +5,4 @@ riderModule.iml
|
|||
/_ReSharper.Caches/
|
||||
.idea/
|
||||
settings.json
|
||||
.vs/
|
||||
|
|
|
@ -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}]"));
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue