Issue #257 resolved

Make separate error.log and access.log

Robert Brewer
created an issue

The access.log should use the Common Log Format (see http://httpd.apache.org/docs/1.3/logs.html#common). The screen might output both in a mixed log if logToScreen is True.

Comments (5)

  1. Robert Brewer reporter

    Stage 1 complete: you can now get an access log (in Common Log Format) by setting "server.logAccessFile" to some writable filename. The old log has not changed; stage 2 will probably be to remove access messages from the old log file, and only use it for errors/config.

    Screen output (if enabled) includes messages for both logs, just mixing them as they arise.

    The only major bummer is that I violated the CLF spec a bit--if there's no "Content-Length" header (as in a pure HTTP/1.1 conversation when content is yielded from a page handler), then there's no number of bytes in the response body. I had the logger output "-" in that case, which actually signifies no body. The alternative seemed worse (violating Peter Hunt's nice isolated WSGIServer by making it write to CP's log).

  2. Robert Brewer reporter

    Fixed in changeset [559]. Access messages are only printed to the error.log if there is no access.log file defined. The code has been commented for removal in CP 2.2.

  3. Log in to comment