import_logs.py fails to detect log type with multiple IPs in first line #4230
Labels
duplicate
For issues that already existed in our issue tracker and were reported previously.
Enhancement
For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Milestone
When using the X-forwarded-for header for load-balanced sites or proxied traffic, it is possible for the webserver to record multiple IPs on a line. This appears to break the log detection of import_logs.py.
Broken example log:
Stack trace:
While a quick fix is to move any offending lines beyond a "good" line, this is not easily automated.
Modifying log above so script works:
I admit, my python-foo is not excellent but I may look over the weekend and try to patch the code. I believe the best option is to catch the error in detection and try the next line.
The text was updated successfully, but these errors were encountered: