You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4php-dev@logging.apache.org by "Ivan Habunek (Updated) (JIRA)" <ji...@apache.org> on 2011/12/08 16:49:40 UTC
[jira] [Updated] (LOG4PHP-127) PHP Fatal error: Nesting level too
deep - recursive dependency? when logging an object with recursive
dependancies
[ https://issues.apache.org/jira/browse/LOG4PHP-127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ivan Habunek updated LOG4PHP-127:
---------------------------------
Fix Version/s: (was: 2.2)
Not planned for 2.2.
> PHP Fatal error: Nesting level too deep - recursive dependency? when logging an object with recursive dependancies
> ------------------------------------------------------------------------------------------------------------------
>
> Key: LOG4PHP-127
> URL: https://issues.apache.org/jira/browse/LOG4PHP-127
> Project: Log4php
> Issue Type: Bug
> Components: Code
> Affects Versions: 2.0
> Environment: linux ubuntu 8.04
> php 5.2
> Log4php 2.0.0
> Reporter: David Pattison
>
> I ran into a problem when you try to log an object with a circular dependency, such as $GLOBALS
> here is a phpsh example:
> php> require 'Logger.php';
> php> Logger::getLogger('foo')->debug($GLOBALS);
> array (
> 'GLOBALS' =>
> array (
> 'GLOBALS' =>
> array (
> 'GLOBALS' =>
> array (
> Fatal error: Nesting level too deep - recursive dependency? in /Users/davidp/Documents/workspace/zoosk-trunk-features/tools/include/vendor/log4php/renderers/LoggerRendererDefault.php on line 49
> I am planing to patch my system so it uses print_r() which will not die in theses cases.
> When I do that I would get this output:
> php> require 'Logger.php';Logger::getLogger('foo')->debug($GLOBALS);
> Thu Oct 14 18:58:48 2010,051 [2688] DEBUG foo - Array
> (
> [GLOBALS] => Array
> *RECURSION*
> [_ENV] => Array
> (
> [TERM_PROGRAM] => Apple_Terminal
> [SHELL] => /bin/bash
> [TERM] => xterm-color
> [TMPDIR] => /var/folders/ME/ME4jssgwHQKMN3vofuUXEU++03M/-Tmp-/
> [Apple_PubSub_Socket_Render] => /tmp/launch-pRh4q5/Render
> [TERM_PROGRAM_VERSION] => 273
> ... ommited...
> some links about theses two methods:
> http://www.php.net/manual/en/function.var-export.php
> http://www.php.net/manual/en/function.print-r.php
> Thanks,
> Dave
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira