How to get Time Machine to include files in /var/log in a backup
Time Machine is designed around ease of use, rather than utility. It does not backup everything on the hard drive, typically not including files that are not necessary to recover from a failure. Log files seem to fit this category.

The first option is to see if you can remove the exclusion using tmutil, which is the commandline version of Time Machine.


  tmutil removeexclusion "/var/log/apache2"


Typically, this command is used for exclusions the user has created, but its worth a try.

The other option is to use something like chron and bash (or Automator) to simply compress the log files into an archive (zip file) and place the archive in your documents folder. I would suggest that you perhaps name your archive file with the date, so Time Machine does not assume they are duplicate or simply newer versions of the same file.