If you are looking for something more simple and more specific. You could consider using AJAX to build your own log files system (or database) containing only the downloads you want to track.
The main reason for this is : because the webserver access logs contains eeeeeevery request made to your webserver. That means when a user only open one of your site's page, it can add an (extremely approximate) average of 30 to 70 lines in your log file. One for every little things used in the page (from HTML/CSS/JS files to every little beautiful 16x16px icons you've made with a lot of love using paint)
So if you want to track only specific files (like if you have a music download site and want to track only those music files), you could add an "onclick" event listener on your download links that DON'T point to the file, instead it fires an AJAX function that will run a server side script in witch you could save the infos about the download (ip address, timestamp, referrer, browser infos, etc...) :
Option 1 : in a log file if you want a simple chronological representation
Option 2 : in a database if you want to keep track of download counters more easily and in a more optimized structure as you won't duplicate data on the server.
After that "infos saving part", send back the URL of the file the user want to download to the browser and then, the browser gonna load this URL and the user gonna be able to download the file.
Using that method, you can be sure the download have been logged before the user download your file. It's better than sending the AJAX request simultaneously when a user click happen.
The only downside of this is : the fact that it's a "top layer" solution, if a user know the URL of your file and write it directly in his address bar, he will bypass your download counter. That wouldn't happen on a log files system based directly on the webserver (Apache or others).