Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-440

non-standard format of the common access log

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.3.0.Beta1, 1.2.7.Final
    • 1.2.4.Final
    • None
    • None

      Default format of log record is not compatible with common logfile format (http://www.w3.org/Daemon/User/Config/Logging.html#common-logfile-format). Although default "pattern" attribute value in

      /subsystem=undertow/server=default-server/host=default-host/setting=access-log
      

      is set to "common" the log record looks like this:

      127.0.0.1 - - 18/May/2015:17:53:57 +0200 GET / HTTP/1.1 304 -
      

      which is almost perfect but whole date and time segment should be enclosed in brackets - [ Date ] - so log line would look like this:

      127.0.0.1 - - [18/May/2015:17:53:57 +0200] GET / HTTP/1.1 304 -
      

      Later format is also one that is used in current jboss-web module.

      So when "pattern" attribute is set to "common" the behavior is not correct according to the W3C standard. When I set "pattern" attribute value of "%t" then log record looks like this:

      18/May/2015:17:54:34 +0200
      

      It simply looks like there is some misunderstanding in implementation of this particular string. Here is how it is defined in apache: http://httpd.apache.org/docs/1.3/logs.html

      [10/Oct/2000:13:55:36 -0700] (%t)
      

            sdouglas1@redhat.com Stuart Douglas
            jstourac@redhat.com Jan Stourac
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: