UsageStats discarding whole logs for one bad entry?

Running OJS 3.1.2.4 and the UsageStats plugin I’ve noticed whole log entries (hundreds of views) are rejected if one line has a bad format. This seems like overkill – why not step over the bad entry, log it, and continue processing?

I’m now going through old rejected logs trying to find the bad lines before staging them again. Is there an easy way to do this? Some entries are obviously bad – weird parsing results in half a userAgent string, for example – but in others it’s really difficult to find the culprit that stops the whole file being processed.

Any help would be appreciated!

1 Like

FWIW I altered the code so that errors are stepped over, meaning that the offending line is ignored and processing continues with the next one. That seems like a far more sensible default than the current behaviour.

Related: UsageStats rejects a whole logfile, even with only one malformed line · Issue #6945 · pkp/pkp-lib · GitHub