finish tweaks to log reader

add some more shared guids
This commit is contained in:
RaidMax
2019-07-26 10:22:02 -05:00
parent ac32034910
commit f613f0aace
3 changed files with 27 additions and 34 deletions

View File

@ -35,10 +35,6 @@ namespace IW4MAdmin.Application.IO
public async Task<ICollection<GameEvent>> ReadEventsFromLog(Server server, long fileSizeDiff, long startPosition)
{
#if DEBUG == true
server.Logger.WriteDebug($"Begin reading from http log at {DateTime.Now.Millisecond}");
#endif
if (!ignoreBots.HasValue)
{
ignoreBots = server.Manager.GetApplicationSettings().Configuration().IgnoreBots;
@ -55,8 +51,11 @@ namespace IW4MAdmin.Application.IO
return events;
}
else if (response.Data != null)
else if (!string.IsNullOrWhiteSpace(response.Data))
{
#if DEBUG
server.Manager.GetLogger(0).WriteInfo(response.Data);
#endif
// parse each line
foreach (string eventLine in response.Data.Split(Environment.NewLine))
{
@ -116,9 +115,6 @@ namespace IW4MAdmin.Application.IO
}
}
#if DEBUG == true
server.Logger.WriteDebug($"End reading from http log at {DateTime.Now.Millisecond}");
#endif
return events;
}
}