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 * 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:

Which seems to indicate I need to add:


To the format/log output.