File: _access_log.erb

package info (click to toggle)
puppet-module-puppetlabs-apache 12.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,664 kB
  • sloc: ruby: 275; sh: 32; makefile: 2
file content (21 lines) | stat: -rw-r--r-- 767 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<% @_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 -%>