Custom Apache log output for virtual host?

Can anyone advise how/where I set-up custom Apache log output for a virtual host using Virtualmin I have a host which has wildcard subdomains *.domain.com and I need to include the subdomain in the log output so we can analyse the traffic to each subdomain which isn’t being reported currently I found these 2 guides:

http://serverfault.com/questions/283513/apache-customlog-to-log-full-url
http://serverfault.com/questions/133892/logformat-for-catching-asked-hostname-in-a-domain-com-scenario

Which seems to indicate I need to add:

%{Host}i

To the format/log output.