[
https://issues.apache.org/jira/browse/LOG4PHP-116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12869502#action_12869502
]
Christian Grobmeier commented on LOG4PHP-116:
---------------------------------------------
As usual a very good patch :-) I like the new processing of xml much and we
should work on this as basis.
I also feel that we should do a 2.1 release very soon. This patch is huge and I
would like to view at it mre in detail so my proposal would be to include this
in a 2.2 release.
Ok, on code:
- you are using the error_get_last method. Please look at the brandnew issue
LOG4PHP-117 which describes problems with this method
- I am not a fan of LoggerLog. We have deleted it because Log4PHP should be so
easy that it doesn't need an internal logging. Debugging a logging framework
should not be necessary. That being said, what are the reasons to include this?
Imho we should discuss more on making everything easier and a better way to
deal with misconfiguration and such on the list. Hopefully others raise their
voices on this too
- I really love the __toString implementation. That was a good idea
- same for getSystemProperty
Anyway thanks for this one again!
> A rewrite of LoggerConfiguratorXML
> ----------------------------------
>
> Key: LOG4PHP-116
> URL: https://issues.apache.org/jira/browse/LOG4PHP-116
> Project: Log4php
> Issue Type: Improvement
> Components: Code
> Reporter: Ivan Habunek
> Attachments: LoggerConfiguratorXML.rewrite.patch
>
>
> As discussed on the mailing list, it was decided that the
> LoggerConfiguratorXML would benefit from a rewrite. This is a full rewrite of
> the class using PHP's SimpleXML extension for parsing XML.
> (http://www.php.net/manual/en/book.simplexml.php)
> The new implementation gives the following benefits compared to the current
> implementation:
> * The code is cleaner and much more readable.
> * The code executes in a more linear fashion, instead of an "infinite loop"
> * The elements in the XML configuration are not parsed in the order they are
> written, therefore the order of elements is no longer important. Well, this
> is not entirely true, the order of parameters might be important for for some
> appenders or other components, but this is not a Configurator issue and has
> to be solved in the said components.
> * Implemented internal error logging and debugging. Makes it easier for end
> user to diagnose problems with the configuration.
> LoggerLog class was reinstated to facilitate internal logging. It is very
> simple, it has 3 logging methods: debug(), error() and warn(). These methods
> use the PHP function trigger_error for logging (with appropreate error types:
> E_USER_NOTICE for debug, E_USER_WARNING for warn and E_USER_ERROR for error
> messages). Error and warning level messages are enabled by default. Debug
> level are disabled by default, but can be enabled by:
> * calling LoggerLog::setInternalDebugging(true)
> * specifying debug="true" in root element of XML config file
> * setting the environment variable log4php.debug=true
> Additionally, the following changes were made to complement the above changes:
> * LoggerOptionConverter::getSystemProperty was modified to check getenv($key)
> as well as $_ENV[$key], because $_ENV global array is sometimes not populated
> depending on the settings in php.ini (see variables_order directive in
> http://php.net/manual/en/ini.core.php).
> * Implemented the __toString method in LoggerLevel. This allows for easier
> logging of levels, e.g. debug("Setting level to $level") where $level is an
> instance of LoggerLevel.
> Note that the debug mode is quite verbose, I tried to show the order in which
> settings are parsed, and state if any setting was ignored and why.
> Please try out and state your opinion. :)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.