resincaucho

Removing query strings from Resin access log


It appears that our resin server is logging the arguments of a GET request. Is there a way for us to configure the logs to not output the query string, or to not output it on certain cases?

This is our access log configuration.

<access-log path='/var/company/logs/access.log'
                            format='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"' rollover-period='1D'
                            archive-format='access.log.%Y%m%d.gz'/>

Thanks.


Solution

  • Try using %U instead of %r in the format to avoid writing out the query.

    To exclude certain URIs, try adding 'exclude' in the access-log as so:

    <access-log path='/log/access.log'>
      <exclude>\.gif$</exclude>
      <exclude>\.png$</exclude>
    </access-log>