Description
While it's arguable if logging problems during the program execution should or should not terminate the program, I'm strongly in favour of raising an exception if the properties file contains illegal options.
Currently there is not even a warning if the user makes a typo!
— src/main/php/LoggerReflectionUtils.php (Revision 812666)
+++ src/main/php/LoggerReflectionUtils.php (Arbeitskopie)
@@ -107,8 +112,7 @@
$method = "set" . ucfirst($name);
if(!method_exists($this->obj, $method))
{ - // no such setter method - return; + throw new Exception("Error setting log4php property $name to $value: no method $method in class ".get_class($this->obj)."!"); }else
{ return call_user_func(array($this->obj, $method), $value); }The error then looks like:
Exception: Error setting log4php property categoryPrefixxing to 1: no method setCategoryPrefixxing in class LoggerLayoutTTCC! in ...
bye,
christian