Uploaded image for project: 'Log4php'
  1. Log4php
  2. LOG4PHP-161

All configurable components should trigger warnings when given invalid values

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.0
    • 2.2.0
    • Code

    Description

      This includes: appenders, layouts, renderers, filters (and any future ones).

      This is usually implemented in the property setter (sometime in activateOptions()). The problem is that the code for checking if something is an integer/boolean/string/whatever, and reporting an error is relatively long (cca 5-10 lines). We do not want to recycle this code for each and every setter.

      The proposed solution is to make a base class from which all configurable classes will inherit. This class will provide generic setters which include validation and error reporting.

      This is a mockup:
      http://pastebin.com/0h4M35Br

      I believe a solution to this issue should be included in 2.2 to complement the new configurator.

      Attachments

        Activity

          People

            juice Ivan Habunek
            juice Ivan Habunek
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: