That would be a case to write in a separate logging function then. But for remote IP, filename, result code, and I believe size, the default Apache log has all of these.
Also, why would you write a HTTP CGI for FTP? Why not just send the file out via HTTP, this alleviates the overhead needed for FTP.