Changeset 15634 in project


Ignore:
Timestamp:
08/29/09 13:23:04 (10 years ago)
Author:
sjamaan
Message:

Add response code and referer to default access log, so it's more like apache and lighttpd's default

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/spiffy/trunk/spiffy.scm

    r15509 r15634  
    133133  (make-parameter
    134134   (lambda ()
    135      (log-to (access-log)
    136              "~A [~A] \"~A ~A HTTP/~A.~A\" ~A"
    137              (remote-address)
    138              (seconds->string (current-seconds))
    139              (request-method (current-request))
    140              (uri->string (request-uri (current-request)))
    141              (request-major (current-request))
    142              (request-minor (current-request))
    143              (let ((product (header-contents 'user-agent
    144                                              (request-headers (current-request)))))
    145                (if product
    146                    (product-unparser 'user-agent product)
    147                    "**Unknown product**"))))))
     135     (let ((h (request-headers (current-request))))
     136      (log-to (access-log)
     137              "~A [~A] \"~A ~A HTTP/~A.~A\" ~A \"~A\" \"~A\""
     138              (remote-address)
     139              (seconds->string (current-seconds))
     140              (request-method (current-request))
     141              (uri->string (request-uri (current-request)))
     142              (request-major (current-request))
     143              (request-minor (current-request))
     144              (response-code (current-response))
     145              (uri->string (header-value 'referer h (uri-reference "-")))
     146              (let ((product (header-contents 'user-agent h)))
     147                (if product
     148                    (product-unparser 'user-agent product)
     149                    "**Unknown product**")))))))
    148150
    149151;;;; End of configuration parameters
Note: See TracChangeset for help on using the changeset viewer.