Feature Wiki

Information about planned and released features

Tabs

Logging Revision

1 Description

Logging should be made more flexible, e.g. different kinds of reporting should be made possible. Eventually we use a third party library like PEARLog or Log4PHP.

SM, 22 Jun 2015: in the meantime log4php seems to be outdated - last release Oct 2012.
A good alternative for a third party library is Monolog, which is widely used in PHP-frameworks and projects.

A new logging service should provide the following features:

  • Log-levels: Support for different log levels (DEBUG, INFO, WARN, ERROR). A definition of which log level has to used in which situation should be provided in the developer guide. Different Log-Levels can be defined for every component in the ILIAS-administration (new administration subsection "logging").
  • Log-Format: The log format should contain real time of the log message (not the time of the request). A unique id for the request (e.g first 4 characters of the session id) and the log level.
  • To keep the dependencies inside the ILIAS code small, all calls to the logging interface should be wrapped in a new logging class (e.g ilLogger). Only the ILIAS administration section "Logging" will access monolog classes directly, for defining/confguring log appenders.
  • Similar to the benchmark feature it should be possible to enable detailed logging for one user/request. These log messages should be exportable.

2 Additional Information

3 Discussion

JourFixe, ILIAS [jourfixe] 2 Mar 2009: One requirement is that ilLog should log the current timestamp for each logline and add a new identifier for determining all loglines of one request. We should analyze existing logging libraries for suitability. It should be possible to create flexible reports on the basis of the log data.

JourFixe, ILIAS [jourfixe], 22 June 2015: We support the request and schedule it for 5.1. We agree that monolog is a good choice and that it should be wrapped into our logger class. Existing code should run, especially the often used ilLog->write() withouth log level should be mapped to an appropriate level. As written above a guideline for developers when each level should be used is important. If possible the component that triggered a log should be identified automatically. Stefan will examine if an integration of monolog into our existing ilLog wrapper is possible and makes sense. This we will discuss in an upcoming JF.

4 Implementation

See documentation in developer guide.

Test Cases

Test cases completed at {date} by {user}

Approval

Tested successfully and approved at {date} by {user}.

Last edited: 7. Sep 2015, 16:09, Killing, Alexander [alex]