[ 
https://issues.apache.org/jira/browse/LOG4PHP-127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ivan Habunek closed LOG4PHP-127.
--------------------------------

    Resolution: Not A Problem

This is no longer an issue. Starting with 2.3.0 it will be possible to override 
the default renderer (see LOG4PHP-141), so you may use any output function you 
like.
                
> 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.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
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to