HLDSLogs v0.1.1 HLDSLogs.LogEntry View Source
A struct representing a HLDS log entry. Simply holds a parsed NaiveDateTime, datetime and a binary string body.
iex(1)> HLDSLogs.LogEntry.from(
...(1)> "L 05/10/2018 - 18:14:39: \"player18<7><STEAM_0:0:0000000000><marine1team>\" triggered \"structure_built\" (type \"resourcetower\")"
...(1)> )
%HLDSLogs.LogEntry{
body: "\"player18<7><STEAM_0:0:0000000000><marine1team>\" triggered \"structure_built\" (type \"resourcetower\")",
datetime: ~N[2018-05-10 18:14:39]
}
Why NaiveDateTime?
HLDS does not provide timezone information with it’s forwarded logs, so this can’t be discerned. It’s up to the caller to understand where servers are, what timezone the box is in, and deal with the resulting datetimes accordingly.
Link to this section Summary
Functions
Create a HLDSLogs.LogEntry struct from a raw string received by a HLDS server
Link to this section Functions
Create a HLDSLogs.LogEntry struct from a raw string received by a HLDS server