To enable error/exception logging the System Log is replacing default error/exception handlers with it's own. This is no big deal unless Debug Mode is enabled. In that case Debugger adds own error/exception handlers even before System Log is able to initialize. Luckily such case is already handled by System Log, which calls any former error/exception handlers after it's own.
What isn't right about this is how it calls them. Currently it's done like this:
Such invocation method only supports error/exception handlers that are defined in 2 forms:
- array, where 1st element is object and 2nd element is method name
- string, that contains method name
In real life there are plenty of ways how we can define error/exception handler.
call_user_func function to invoke previously set error/exception handlers.