Dennis Dennis - 1 month ago 8
Ini Question

How to set Stack trace depth of PHP's error log?

In my

php.ini
I set this line:

error_log = c:/php/php_errors.log


It enables output of errors into the specified file.

However, it always outputs maximum of 4, i.e.:

PHP Fatal error: Uncaught ServiceNotFoundException
Stack trace:
#0 PluginManager.php(124): AbstractPluginManager->get('getEntityManage...', NULL)
#1 AbstractController.php(301): PluginManager->get('getEntityManage...', NULL)
#2 AbstractController.php(316): AbstractController->plugin('getEntityManage...')
#3 AbstractPluginManager.php on line 133
^^^ stops at depth 4 always


I want to control the stack depth. How?
I could not find anything on http://php.net/error-log

Answer

The value is "log_errors_max_len", in php.ini or possibly configurable via ini_set():

ini_set("log_errors_max_len",0);
Comments