Are you trying to discover the real identity of someone or just log ip's?
Anyway it doesnt matter, It takes a huge amount of effort to track ip addresses without having access to the server. If you try to do it without permission then you will just get caught sooner or later.
What if the person you are trying to identify is behind an anon proxy?
What if the proxy's are chained?
There are other ways to identify someone. You just have to be clever.
And no this isnt the place to ask such questions. I'm in a good mood today

So do your research and poke around some other sites that deal with such exploits.
Peace, Woodmann