Am 12.11.2011 20:40, schrieb Christian Grobmeier:
On Sat, Nov 12, 2011 at 8:36 PM, Ivan Habunek<[email protected]>  wrote:
On 12 November 2011 20:31, Christian Grobmeier<[email protected]>  wrote:
Good question.

In my world logging framework should never break an application. So...
what exactly is an error? A console output? standard php logfile
problem?
What I did in the new configurator is use trigger_error() with
E_USER_WARNING parameter. I think this is the standard PHP way to
report non-fatal errors.

The user can handle the warnings as they see fit by implementing an
error handler. Also PHP will log the errors if an error log is
configured in the ini file.
Read the docs - sounds good to me. Thanks.

It is a pity that one looses the magic php powers if one doesn't use
it every day :)

Cheers
Christian

Regards,
Ivan



if we expect in a configuration an attribute like "name" or "class" and we got nothing, we should call this trigger_error() function.

i haven't seen that the LoggerConfigurator class validate the configuration. The configurator still triggers errors if the config is incomplete.

Reply via email to