And web server logs are fine for troubleshooting and detecting abuse, you don't even need to ask for consent!
Only things like tracking, ads, and sending data to areas without equivalent privacy laws are forbidden. The intent and usage of the collected information is a big part of what is and isn't allowed.