I would create a custom StaticFileHandler and add the logic there. See this blog post for an example: http://www.markeverard.com/blog/2010/09/15/using-the-dynamicdatastore-to-count-file-downloads/.
Hope this helps.
Thank you Frederik, I will try it out.
I posted this in the EPiServer 5r2 forum but maybe this is a more correct place.
I need to log all user access (read via click) to UnifiedFile files (.zip files for example), just a simple log access counter. Problem is I can't seem to find anyway to hook up to a relevent event. Anyone got any ideas or workarounds?