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 (Created) (JIRA)" <ji...@apache.org> on 2011/09/30 08:25:45 UTC

[jira] [Created] (LOG4PHP-152) A rewrite of the configurator

A rewrite of the configurator
-----------------------------

                 Key: LOG4PHP-152
                 URL: https://issues.apache.org/jira/browse/LOG4PHP-152
             Project: Log4php
          Issue Type: Improvement
          Components: Code
    Affects Versions: 2.1
            Reporter: Ivan Habunek
            Assignee: Ivan Habunek
             Fix For: 2.2


The current configuration system uses 3 separate objects to configure log4php - one for each configuration format XML, properties and PHP. This often caused inconsistencies in the way log4php is configured - the equivalent configuration would not produce the same results.

The idea is to create a singe Configurator object which will _only_ take configuration as a PHP array. Then create several Adapter objects (one for each configuration format) which will translate the configuration from that format to a PHP array understood by the Configurator. This would make the Configurator the single class which configures log4php.

The second goal of this action is to improve error reporting. Any configuration which cannot be parsed, or any invalid value in configuration should produce a PHP warning informing the user what's wrong.

Thirdly, we should insure that the configurator does not throw any exceptions. Any errors should only result in a warning message so it doesn't break apps just because it cannot log.

Lastly, we can standardize and document the PHP configuration format which exists already, but is not documented.

--
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

        

[jira] [Commented] (LOG4PHP-152) A rewrite of the configurator

Posted by "Florian Semm (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4PHP-152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13152244#comment-13152244 ] 

Florian Semm commented on LOG4PHP-152:
--------------------------------------

i have added some additional 

see log4php.patch
                
> A rewrite of the configurator
> -----------------------------
>
>                 Key: LOG4PHP-152
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-152
>             Project: Log4php
>          Issue Type: Improvement
>          Components: Code
>    Affects Versions: 2.1
>            Reporter: Ivan Habunek
>            Assignee: Ivan Habunek
>             Fix For: 2.2
>
>         Attachments: log4php.patch
>
>
> The current configuration system uses 3 separate objects to configure log4php - one for each configuration format XML, properties and PHP. This often caused inconsistencies in the way log4php is configured - the equivalent configuration would not produce the same results.
> The idea is to create a singe Configurator object which will _only_ take configuration as a PHP array. Then create several Adapter objects (one for each configuration format) which will translate the configuration from that format to a PHP array understood by the Configurator. This would make the Configurator the single class which configures log4php.
> The second goal of this action is to improve error reporting. Any configuration which cannot be parsed, or any invalid value in configuration should produce a PHP warning informing the user what's wrong.
> Thirdly, we should insure that the configurator does not throw any exceptions. Any errors should only result in a warning message so it doesn't break apps just because it cannot log.
> Lastly, we can standardize and document the PHP configuration format which exists already, but is not documented.

--
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

        

[jira] [Updated] (LOG4PHP-152) A rewrite of the configurator

Posted by "Florian Semm (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LOG4PHP-152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Florian Semm updated LOG4PHP-152:
---------------------------------

    Comment: was deleted

(was: i have added some additional 

see log4php.patch)
    
> A rewrite of the configurator
> -----------------------------
>
>                 Key: LOG4PHP-152
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-152
>             Project: Log4php
>          Issue Type: Improvement
>          Components: Code
>    Affects Versions: 2.1
>            Reporter: Ivan Habunek
>            Assignee: Ivan Habunek
>             Fix For: 2.2
>
>         Attachments: log4php.patch
>
>
> The current configuration system uses 3 separate objects to configure log4php - one for each configuration format XML, properties and PHP. This often caused inconsistencies in the way log4php is configured - the equivalent configuration would not produce the same results.
> The idea is to create a singe Configurator object which will _only_ take configuration as a PHP array. Then create several Adapter objects (one for each configuration format) which will translate the configuration from that format to a PHP array understood by the Configurator. This would make the Configurator the single class which configures log4php.
> The second goal of this action is to improve error reporting. Any configuration which cannot be parsed, or any invalid value in configuration should produce a PHP warning informing the user what's wrong.
> Thirdly, we should insure that the configurator does not throw any exceptions. Any errors should only result in a warning message so it doesn't break apps just because it cannot log.
> Lastly, we can standardize and document the PHP configuration format which exists already, but is not documented.

--
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

        

[jira] [Issue Comment Edited] (LOG4PHP-152) A rewrite of the configurator

Posted by "Florian Semm (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4PHP-152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13152247#comment-13152247 ] 

Florian Semm edited comment on LOG4PHP-152 at 11/17/11 7:14 PM:
----------------------------------------------------------------

some tests for

- LoggerConfigurator
- LoggerAppenderPool
                
      was (Author: floriansemm):
    some tests for

* LoggerConfigurator
* LoggerAppenderPool
                  
> A rewrite of the configurator
> -----------------------------
>
>                 Key: LOG4PHP-152
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-152
>             Project: Log4php
>          Issue Type: Improvement
>          Components: Code
>    Affects Versions: 2.1
>            Reporter: Ivan Habunek
>            Assignee: Ivan Habunek
>             Fix For: 2.2
>
>         Attachments: log4php.patch
>
>
> The current configuration system uses 3 separate objects to configure log4php - one for each configuration format XML, properties and PHP. This often caused inconsistencies in the way log4php is configured - the equivalent configuration would not produce the same results.
> The idea is to create a singe Configurator object which will _only_ take configuration as a PHP array. Then create several Adapter objects (one for each configuration format) which will translate the configuration from that format to a PHP array understood by the Configurator. This would make the Configurator the single class which configures log4php.
> The second goal of this action is to improve error reporting. Any configuration which cannot be parsed, or any invalid value in configuration should produce a PHP warning informing the user what's wrong.
> Thirdly, we should insure that the configurator does not throw any exceptions. Any errors should only result in a warning message so it doesn't break apps just because it cannot log.
> Lastly, we can standardize and document the PHP configuration format which exists already, but is not documented.

--
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

        

[jira] [Resolved] (LOG4PHP-152) A rewrite of the configurator

Posted by "Ivan Habunek (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LOG4PHP-152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Habunek resolved LOG4PHP-152.
----------------------------------

    Resolution: Fixed

I believe the new configurator is stable enough to be released. Resolving issue.
                
> A rewrite of the configurator
> -----------------------------
>
>                 Key: LOG4PHP-152
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-152
>             Project: Log4php
>          Issue Type: Improvement
>          Components: Code
>    Affects Versions: 2.1
>            Reporter: Ivan Habunek
>            Assignee: Ivan Habunek
>             Fix For: 2.2
>
>         Attachments: log4php.patch
>
>
> The current configuration system uses 3 separate objects to configure log4php - one for each configuration format XML, properties and PHP. This often caused inconsistencies in the way log4php is configured - the equivalent configuration would not produce the same results.
> The idea is to create a singe Configurator object which will _only_ take configuration as a PHP array. Then create several Adapter objects (one for each configuration format) which will translate the configuration from that format to a PHP array understood by the Configurator. This would make the Configurator the single class which configures log4php.
> The second goal of this action is to improve error reporting. Any configuration which cannot be parsed, or any invalid value in configuration should produce a PHP warning informing the user what's wrong.
> Thirdly, we should insure that the configurator does not throw any exceptions. Any errors should only result in a warning message so it doesn't break apps just because it cannot log.
> Lastly, we can standardize and document the PHP configuration format which exists already, but is not documented.

--
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

        

[jira] [Updated] (LOG4PHP-152) A rewrite of the configurator

Posted by "Florian Semm (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LOG4PHP-152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Florian Semm updated LOG4PHP-152:
---------------------------------

    Attachment: log4php.patch

some tests for

- LoggerConfigurator
- LoggerAppenderPool
                
> A rewrite of the configurator
> -----------------------------
>
>                 Key: LOG4PHP-152
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-152
>             Project: Log4php
>          Issue Type: Improvement
>          Components: Code
>    Affects Versions: 2.1
>            Reporter: Ivan Habunek
>            Assignee: Ivan Habunek
>             Fix For: 2.2
>
>         Attachments: log4php.patch
>
>
> The current configuration system uses 3 separate objects to configure log4php - one for each configuration format XML, properties and PHP. This often caused inconsistencies in the way log4php is configured - the equivalent configuration would not produce the same results.
> The idea is to create a singe Configurator object which will _only_ take configuration as a PHP array. Then create several Adapter objects (one for each configuration format) which will translate the configuration from that format to a PHP array understood by the Configurator. This would make the Configurator the single class which configures log4php.
> The second goal of this action is to improve error reporting. Any configuration which cannot be parsed, or any invalid value in configuration should produce a PHP warning informing the user what's wrong.
> Thirdly, we should insure that the configurator does not throw any exceptions. Any errors should only result in a warning message so it doesn't break apps just because it cannot log.
> Lastly, we can standardize and document the PHP configuration format which exists already, but is not documented.

--
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

        

[jira] [Commented] (LOG4PHP-152) A rewrite of the configurator

Posted by "Ivan Habunek (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4PHP-152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13153450#comment-13153450 ] 

Ivan Habunek commented on LOG4PHP-152:
--------------------------------------

This patch is really very good. Thanks for the work. 

I like the idea of having the test/resources/config/ dir for all configuration files. I moved others there as well and renamed them to something more sensible than config1, config2...

I have done some very minor changes, like using dirname(__FILE__) in place of __DIR__ to keep compatibility with PHP 5.2.x.
                
> A rewrite of the configurator
> -----------------------------
>
>                 Key: LOG4PHP-152
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-152
>             Project: Log4php
>          Issue Type: Improvement
>          Components: Code
>    Affects Versions: 2.1
>            Reporter: Ivan Habunek
>            Assignee: Ivan Habunek
>             Fix For: 2.2
>
>         Attachments: log4php.patch
>
>
> The current configuration system uses 3 separate objects to configure log4php - one for each configuration format XML, properties and PHP. This often caused inconsistencies in the way log4php is configured - the equivalent configuration would not produce the same results.
> The idea is to create a singe Configurator object which will _only_ take configuration as a PHP array. Then create several Adapter objects (one for each configuration format) which will translate the configuration from that format to a PHP array understood by the Configurator. This would make the Configurator the single class which configures log4php.
> The second goal of this action is to improve error reporting. Any configuration which cannot be parsed, or any invalid value in configuration should produce a PHP warning informing the user what's wrong.
> Thirdly, we should insure that the configurator does not throw any exceptions. Any errors should only result in a warning message so it doesn't break apps just because it cannot log.
> Lastly, we can standardize and document the PHP configuration format which exists already, but is not documented.

--
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

        

[jira] [Issue Comment Edited] (LOG4PHP-152) A rewrite of the configurator

Posted by "Florian Semm (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4PHP-152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13152247#comment-13152247 ] 

Florian Semm edited comment on LOG4PHP-152 at 11/17/11 7:13 PM:
----------------------------------------------------------------

some tests for

* LoggerConfigurator
* LoggerAppenderPool
                
      was (Author: floriansemm):
    some tests for

- LoggerConfigurator
- LoggerAppenderPool
                  
> A rewrite of the configurator
> -----------------------------
>
>                 Key: LOG4PHP-152
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-152
>             Project: Log4php
>          Issue Type: Improvement
>          Components: Code
>    Affects Versions: 2.1
>            Reporter: Ivan Habunek
>            Assignee: Ivan Habunek
>             Fix For: 2.2
>
>         Attachments: log4php.patch
>
>
> The current configuration system uses 3 separate objects to configure log4php - one for each configuration format XML, properties and PHP. This often caused inconsistencies in the way log4php is configured - the equivalent configuration would not produce the same results.
> The idea is to create a singe Configurator object which will _only_ take configuration as a PHP array. Then create several Adapter objects (one for each configuration format) which will translate the configuration from that format to a PHP array understood by the Configurator. This would make the Configurator the single class which configures log4php.
> The second goal of this action is to improve error reporting. Any configuration which cannot be parsed, or any invalid value in configuration should produce a PHP warning informing the user what's wrong.
> Thirdly, we should insure that the configurator does not throw any exceptions. Any errors should only result in a warning message so it doesn't break apps just because it cannot log.
> Lastly, we can standardize and document the PHP configuration format which exists already, but is not documented.

--
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

        

[jira] [Commented] (LOG4PHP-152) A rewrite of the configurator

Posted by "Ivan Habunek (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4PHP-152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149268#comment-13149268 ] 

Ivan Habunek commented on LOG4PHP-152:
--------------------------------------

The new code has been merged with trunk. It is pretty stable and all tests pass. 

Additional tests have to be written to improve code coverage.
                
> A rewrite of the configurator
> -----------------------------
>
>                 Key: LOG4PHP-152
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-152
>             Project: Log4php
>          Issue Type: Improvement
>          Components: Code
>    Affects Versions: 2.1
>            Reporter: Ivan Habunek
>            Assignee: Ivan Habunek
>             Fix For: 2.2
>
>
> The current configuration system uses 3 separate objects to configure log4php - one for each configuration format XML, properties and PHP. This often caused inconsistencies in the way log4php is configured - the equivalent configuration would not produce the same results.
> The idea is to create a singe Configurator object which will _only_ take configuration as a PHP array. Then create several Adapter objects (one for each configuration format) which will translate the configuration from that format to a PHP array understood by the Configurator. This would make the Configurator the single class which configures log4php.
> The second goal of this action is to improve error reporting. Any configuration which cannot be parsed, or any invalid value in configuration should produce a PHP warning informing the user what's wrong.
> Thirdly, we should insure that the configurator does not throw any exceptions. Any errors should only result in a warning message so it doesn't break apps just because it cannot log.
> Lastly, we can standardize and document the PHP configuration format which exists already, but is not documented.

--
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

        

[jira] [Commented] (LOG4PHP-152) A rewrite of the configurator

Posted by "Ivan Habunek (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4PHP-152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13117912#comment-13117912 ] 

Ivan Habunek commented on LOG4PHP-152:
--------------------------------------

The work is already well under way at an experimental branch:
https://svn.apache.org/repos/asf/logging/log4php/branches/experimental/config-adapters


                
> A rewrite of the configurator
> -----------------------------
>
>                 Key: LOG4PHP-152
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-152
>             Project: Log4php
>          Issue Type: Improvement
>          Components: Code
>    Affects Versions: 2.1
>            Reporter: Ivan Habunek
>            Assignee: Ivan Habunek
>             Fix For: 2.2
>
>
> The current configuration system uses 3 separate objects to configure log4php - one for each configuration format XML, properties and PHP. This often caused inconsistencies in the way log4php is configured - the equivalent configuration would not produce the same results.
> The idea is to create a singe Configurator object which will _only_ take configuration as a PHP array. Then create several Adapter objects (one for each configuration format) which will translate the configuration from that format to a PHP array understood by the Configurator. This would make the Configurator the single class which configures log4php.
> The second goal of this action is to improve error reporting. Any configuration which cannot be parsed, or any invalid value in configuration should produce a PHP warning informing the user what's wrong.
> Thirdly, we should insure that the configurator does not throw any exceptions. Any errors should only result in a warning message so it doesn't break apps just because it cannot log.
> Lastly, we can standardize and document the PHP configuration format which exists already, but is not documented.

--
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

        

[jira] [Issue Comment Edited] (LOG4PHP-152) A rewrite of the configurator

Posted by "Florian Semm (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4PHP-152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13152247#comment-13152247 ] 

Florian Semm edited comment on LOG4PHP-152 at 11/17/11 7:15 PM:
----------------------------------------------------------------

some additional tests for

- LoggerConfigurator
- LoggerAppenderPool
                
      was (Author: floriansemm):
    some tests for

- LoggerConfigurator
- LoggerAppenderPool
                  
> A rewrite of the configurator
> -----------------------------
>
>                 Key: LOG4PHP-152
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-152
>             Project: Log4php
>          Issue Type: Improvement
>          Components: Code
>    Affects Versions: 2.1
>            Reporter: Ivan Habunek
>            Assignee: Ivan Habunek
>             Fix For: 2.2
>
>         Attachments: log4php.patch
>
>
> The current configuration system uses 3 separate objects to configure log4php - one for each configuration format XML, properties and PHP. This often caused inconsistencies in the way log4php is configured - the equivalent configuration would not produce the same results.
> The idea is to create a singe Configurator object which will _only_ take configuration as a PHP array. Then create several Adapter objects (one for each configuration format) which will translate the configuration from that format to a PHP array understood by the Configurator. This would make the Configurator the single class which configures log4php.
> The second goal of this action is to improve error reporting. Any configuration which cannot be parsed, or any invalid value in configuration should produce a PHP warning informing the user what's wrong.
> Thirdly, we should insure that the configurator does not throw any exceptions. Any errors should only result in a warning message so it doesn't break apps just because it cannot log.
> Lastly, we can standardize and document the PHP configuration format which exists already, but is not documented.

--
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