You mean log all urls into a seperate file, or to log at all?
The problem with trying to log all urls is that you have to somehow figure out what is a URL and what isn't, and even the best of url catchers don't catch all of them. However, to catch a good number of them, you will need to use $regex/$regml or $regsub. Given the choice between too sensitive (catching false hits and missing few valid urls) and not sensitive enough (rarely catching false hits but missing more valid urls), if the idea is to catch/stop spammers, you'd want to go for more sensitive and ban later or less sensitive and banning immediately.
I'm sure the problem becomes clear, but it's also based on your purpose and intended usage.