Rails Logging problem

Discussion in 'Ruby/Rails' started by andreas, Sep 25, 2006.

  1. andreas

    andreas Well-Known Member


    all Rails requests are logged with 404 status. Isn't it possible to log the real status code?

  2. mistwang

    mistwang LiteSpeed Staff

    Which log file do you refer to?

    The real status code has been logged into access log. There might be "File not found" logged in error log, but you can safely ignore that.
  3. andreas

    andreas Well-Known Member

    Sorry, wrong description of the problem.

    The problem is that I get a lot of "File not found" and "Index file is not available" messages in the server log viewer in the web interface that don't make a lot of sense.
  4. mistwang

    mistwang LiteSpeed Staff

    You can safely ignore them since Rails are invoked by 404 handler.
    We will address this issue in next release.
  5. andreas

    andreas Well-Known Member

    Thanks. .
  6. xing

    xing LiteSpeed Staff

    You can get rid of those message but upping the default error log level from "info" to "notice". Llitespeed use 404 internal redirect for rail requests, that's why you are seeing them.
  7. andreas

    andreas Well-Known Member

    There IS some kind of bug. I often see status 404 logged in my access log where a 404 could not have happened: - - [12/Oct/2006:16:13:39 +0200] "GET /topic/13442 HTTP/1.1" 404 - "-" "Mediapartners-Google/2.1" "www.mikrocontroller.net" - - [12/Oct/2006:16:16:55 +0200] "GET /forum/3 HTTP/1.1" 404 - "http://www.mikrocontroller.net/forum/7" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)" "www.mikrocontroller.net"

    I could reproduce the problem once: - - [12/Oct/2006:16:27:14 +0200] "GET /forum/7 HTTP/1.0" 404 - "-" "ApacheBench/1.3d" "www.mikrocontroller.net"

    ApacheBench didn't report a 404.

    LSWS 2.2.2, LSAPI 1.11
  8. mistwang

    mistwang LiteSpeed Staff

    This could happen when a reqest was cancel before it being processed by the backend rails engine.

    Maybe we could void logging canceled requests.

Share This Page