<% @_access_logs.each do |log| -%>
<%   env ||= "env=#{log['env']}" if log['env'] -%>
<%   env ||= '' -%>
<%   format ||= "\"#{log['format']}\"" if log['format'] -%>
<%   format ||= 'combined' -%>
<%   if log['file'] -%>
<%     if log['file'].chars.first == '/' -%>
<%       destination = "#{log['file']}" -%>
<%     else -%>
<%       destination = "#{@logroot}/#{log['file']}" -%>
<%     end -%>
<%   elsif log['syslog'] -%>
<%     destination = log['syslog'] -%>
<%   elsif log['pipe'] -%>
<%     destination = log['pipe'] -%>
<%   else -%>
<%     destination ||= "#{@logroot}/#{@filename}_access_ssl.log" if @ssl -%>
<%     destination ||= "#{@logroot}/#{@filename}_access.log" -%>
<%   end -%>
  CustomLog "<%= destination %>" <%= format %> <%= env %>
<% end -%>
