Apache2 generated /home/test/my_log_file. But no logs were written in the file even after I run `/etc/init.d/apache2 restart`.
Are you sure that the user that runs apache has write access in that directory? Also if you have vhosts enabled, check where their log files are located.
Regarding the logs format you can take a look at this
. I prefer the combined CustomLog as contaims Referrer and User-Agent, that is good for web site log analysis.