You can't put a RewriteLog directive in an .htaccess. This is available in the server config or virtual host config only.
example for vhost:
/etc/apache2/sites-available/yoursite.com.conf
<VirtualHost *:80>
<IfModule mod_rewrite.c>
RewriteLog /var/log/apache2/rewrite.log
RewriteLogLevel 9
</IfModule>
ServerName yoursite.com
DocumentRoot /var/www/yoursite/html
<Directory "/var/www/yoursite/html">
<IfModule mod_rewrite.c>
RewriteEngine On
</IfModule>
</Directory>
</VirtualHost>
example for all sites on your server (global):
create file like /etc/apache2/conf-available/debug.conf
add your configuration here:
<IfModule mod_rewrite.c>
RewriteLog /var/log/apache2/rewrite.log
RewriteLogLevel 9
</IfModule>
enable the config:
sudo a2enconf debug ; sudo service apache2 reload
disable the config:
sudo a2disconf debug ; sudo service apache2 reload