You mention the Apache max_input_vars as a limitation, but there is another limitation that is just as important: who will sift through thousands of log lines at a time and then submit their commentary input one at a time without regard for what they already submitted before and at the same time receive the same flood of log lines as they viewed before?
Conceptually I would paginate the log lines so that only 10 to mabe 100 are displayed at the same time, I would also give users the possibility to see by default a page of log lines that they haven't commented on before by making a filter available that removes log lines that the user commented on in the past.
Of course the filter of already commented on log lines would be implemented in the database by adding a field in the sql definition of the log lines that is initially unset for log lines that received no comments from the user and then set after the user submitted a comment for that log line.
For pagination I would make a query to first get from the database the most recent 10 or 100 log lines, display that index of log lines to the user with the display of what log lines counts they are currently seeing.
I would also consider the making of a comment on a particular log line an interface page of its own.