Child pages
  • [system log] Use "System Log" to log HTTP requests [5.3.0-B1]
Skip to end of metadata
Go to start of metadata

Imported From: http://groups.google.com/group/in-portal-dev/browse_thread/thread/1dd9d2e36c788d54#

In-Portal has a functionality to log all incoming HTTP requests. Logging can be enabled by specifying path to log file in DBG_REQUREST_LOG constant in /system/debug.php

After using this functionality for a while here are few things I've noticed:

  • Pros:
    • GET/POST/COOKIE is recorded
    • some other information to identify user, who made a request is recorded
  • Cons:
    • hard to analyze, because in a result a large text file is created
    • HTTP headers not recorded

Gladly in  INP-811 - Getting issue details... STATUS  task we've create flexible logging engine that logs same information but in easily browsable/searchable form.

I recommend to use this "System Log" section to log all information. But we also need to improve "System Log" section by adding ability to log HTTP headers along with HTTP requests.

Related Tasks

INP-1245 - Getting issue details... STATUS

1 Comment

  1. Also to enable advanced logic behind what to log and what not to log I'm proposing to move actual logging code ($this->Application->log method call) to an "adm:OnLogHttpRequest" event. This way developers can extend AdminEventHandler class and write necessary logic over existing adm:OnLogHttpRequest.

    That event in turn will be called from existing code based on whatever DBG_REQUREST_LOG constant is turned on (or even maybe use dedicated system log component instead).

    Also I belive, that current decision not to log requests from non logged-in users made in kApplication class should be moved into new "adm:OnLogHttpRequest" event as well.