You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4php-dev@logging.apache.org by "Ivan Habunek (Resolved) (JIRA)" <ji...@apache.org> on 2011/12/12 16:43:31 UTC

[jira] [Resolved] (LOG4PHP-161) All configurable components should trigger warnings when given invalid values

     [ https://issues.apache.org/jira/browse/LOG4PHP-161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Habunek resolved LOG4PHP-161.
----------------------------------

    Resolution: Fixed
      Assignee: Ivan Habunek

Done. That was a big scary commit... Hopefully nothing is broken. :-) All tests pass.
                
> All configurable components should trigger warnings when given invalid values
> -----------------------------------------------------------------------------
>
>                 Key: LOG4PHP-161
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-161
>             Project: Log4php
>          Issue Type: Improvement
>          Components: Code
>    Affects Versions: 2.1
>            Reporter: Ivan Habunek
>            Assignee: Ivan Habunek
>              Labels: configuration, validation
>             Fix For: 2.2
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira