This procedure loads the log into a string list. For each line in the log, it assigns the CommaText property of the corresponding row in the grid control. That property automatically splits comma- and space-separated tokens in a string. If you have a newer Delphi version, you can use the DelimitedText property instead, which will be more appropriate if the log might ever contain unquoted commas.
procedure LoadLogFile(const FileName: TFileName; Grid: TStringGrid);
var
LogFile: TStrings;
i: Integer;
begin
LogFile := TStringList.Create;
try
LogFile.LoadFromFile(FileName);
Grid.RowCount := LogFile.Count;
for i := 0 to Pred(LogFile.Count) do
Grid.Rows[i].CommaText := LogFile[i];
finally
LogFile.Free;
end;
end;