How can I log page cache hit rate?
I figured out how to make nginx do the logging in a rudimentary way. I just added the following after my fastcgi_pass directive.

log_format cache '$time_local $remote_addr $request_uri $sent_http_x_drupal_cache';
access_log /var/log/nginx/cache.log cache;


I'm not going to mark this as answered, because there are some problems with this solution:


Doesn't exclude pages that don't have the X-Drupal-Cache header set (logged-in users)
Doesn't exclude IPs I don't want logged (mine, for example)


For now I'll just deal with those issues when I parse the log file to create my stats, but if someone has a way to exclude them from the log then that would be preferable.