So if you want that information, find a way to ask the user first. If you can give a good and understandable explanation on how the information is useful, the users might give their consent happily.
If you're building a website, I think it's fairly reasonable for you to store my IP. That's inside my expected privacy loss when dealing with a remote party. I have to connect to your computer, much like i have to physically walk into a store. I don't mind you remembering that I was there. Running a compiler on the other hand feels more "private" to me somehow. My expectation when using a compiler is that it won't send anything to anyone, because why would it?
In general I think our industry is starved for relevant and foundational ethics research, outside of the FSF at least.
Opt-out is generally rejected by European privacy laws.
...where personal data is involved.
It strikes me that this proposal goes to considerable lengths to avoid collecting anything that could be considered personal data.
Storing IP addresses in logs means that you are now responsible for them, yes. Drop them out of your logs, and you're perfectly fine.
https://gdpr.eu/eu-gdpr-personal-data/
You have to be very careful to do it properly.