Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-811

Add "System Log" section for recording all notices/warnings/errors

    XMLWordPrintable

    Details

    • Type: Feature Request
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 5.1.2-B1
    • Fix Version/s: 5.2.1-B1
    • Component/s: System Log
    • Labels:
      None
    • Additional information:
      Hide

      === Info moved from #268 ===
      1. create kLogger class, that would:

      • handle sql error processing
      • handle php error processing
      • handle exception processing
      • ability to handle user defined events
      • put data to silent log, when not in debug mode
      • also record $_SERVER['HTTP_HOST'] to store host, where problem was found in multi-user development environment
      • also record current user id (guest or not) and it's session data
      • optionally use database to store all errors, that are happening
      • report errors to in-portal website for analysis
      Show
      === Info moved from #268 === 1. create kLogger class, that would: handle sql error processing handle php error processing handle exception processing ability to handle user defined events put data to silent log, when not in debug mode also record $_SERVER ['HTTP_HOST'] to store host, where problem was found in multi-user development environment also record current user id (guest or not) and it's session data optionally use database to store all errors, that are happening report errors to in-portal website for analysis
    • Change Log Message:
      Added powerful Event Logging engine
    • Story Points:
      3
    • External issue ID:
      1003
    • Copy Issue Key:
    • Patch Instructions:

      Patches must be submitted through Phabricator.

      Description

      In-Portal has very powerful logging system when debug mode is on, but if developer won't look at errors reported there in time (e.g. before he closes the page with debugger), then most probably he won't get same error next time.

      Also In-Portal has nice "Silent Log" feature, when all errors got written to file, but it is turned off by default and that log (since it's a text file) can't be easily analysed.

      So this is good error reporting code, but it's results are not being recorded for future analysis and what's is recorded is not enough to properly pinpoint problematic place in code after error already happened and there is no more place to retrieve data from.

      To solve above mentioned issues I'm proposing to create kLogger class (and associated SystemLog table), that would:

      • handle sql error processing
      • handle php error/notice/warning processing
      • handle exception processing
      • handle user-defined messages

      What should be recorded along with each event being logged:

      • $_SERVER['HTTP_HOST'] - address of page's webserver (useful in multi-user development environment)
      • $_SERVER['REMOTE_ADDR'] - ip address of page visitor
      • current user id (guest or not)
      • SessionData/UserSession table - session data
      • SessionID - session id (when available)
      • $_GET, $_POST, $_COOKIE - user input on page, where event happened
      • $_SERVER['REQUEST_URI'] - url that was used to access the page
      • $this->Application->isAdmi - is user an admin or not
      • complete trace to the php method, that raised that event
        [TODO] * occurrences count: today/yesterday/last week/last month
        [TODO] * last occurrence on - date/time when event was raised

      Automatic system log cleanup:

      • none
      • automatic (weekly)
      • automatic (monthly)

      In Admin Console there will be a new section under "Summary & Logs" called "System Log" with list of all logged events, that happened.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                alex Alex
                Developer:
                Alex
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: