I have a number of sites using cloudflare as a CDN with the apache mod_cloudflare installed to restore original visitor IPs to my server logs. Does anyone know of a way I can make the logs identify which requests came via cloudflare and which didn't?
I took a look through the source code for mod_cloudfare.c: https://github.com/cloudflare/CloudFlare-Tools/blob/master/mod_cloudflare.c. It appears that the module logs the information you are looking for:
Based on this code, it appears this information will appear in the error log. It does not appear that module has any facility for modifying other parts of the request to identify modified entries in the access_log.
If there are headers that cloudflare sends that you wish to log, you can append them to your access_log using