Sha256: 95d677a5a4fc0356ce002b0fe3db72822c18004df47e6bb482ba0e4d4b64b39d

Contents?: true

Size: 805 Bytes

Versions: 6

Compression:

Stored size: 805 Bytes

Contents

# -*- encoding: binary -*-

class Clogger

  # predefined log formats in wide use
  module Format
    # common log format used by Apache:
    # https://httpd.apache.org/docs/2.4/logs.html
    Common = "$remote_addr - $remote_user [$time_local] " \
             '"$request" $status $response_length'

    # combined log format used by Apache:
    # https://httpd.apache.org/docs/2.4/logs.html
    Combined = %Q|#{Common} "$http_referer" "$http_user_agent"|

    # combined log format used by nginx:
    # http://wiki.nginx.org/NginxHttpLogModule
    NginxCombined = Combined.gsub(/response_length/, 'body_bytes_sent')

    # log format used by Rack 1.0
    Rack_1_0 = "$ip - $remote_user [$time_local{%d/%b/%Y %H:%M:%S}] " \
               '"$request" $status $response_length $request_time{4}'
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
clogger-2.4.0 lib/clogger/format.rb
clogger-2.3.1 lib/clogger/format.rb
clogger-2.3.0 lib/clogger/format.rb
clogger-2.2.1 lib/clogger/format.rb
clogger-2.2.0 lib/clogger/format.rb
clogger-2.1.0 lib/clogger/format.rb