Adam,<div><br></div><div>We found most of the time spent in log4php was parsing the xml configuration etc...</div><div>through xdebug even wheng log level was configured to FATAL and log-&gt;debug was invoked.</div><div><br>

</div><div>To avoid un-necessary loss of time in log preference we provided mockup implementation of log4php and moved library to log4php.debug only for developer debug purpose which can be enabled via config.performacne.php</div>

<div><br>Regards,</div><div>Prasad</div><div><br><br><div class="gmail_quote">On Wed, Dec 7, 2011 at 2:14 AM, Adam Heinz <span dir="ltr">&lt;<a href="mailto:amh@metricwise.net">amh@metricwise.net</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I recently noticed that log4php/LoggerManager.php has the comment /**<br>
Classes to avoid logging */.  This seems a bit counterintuitive to me<br>
-- I would think it would be as simple as dialing down log levels in<br>
log4php.properties, unless the underlying library is painfully slow.<br>
I grabbed the latest tarball from<br>
<a href="http://logging.apache.org/log4php/download.html" target="_blank">http://logging.apache.org/log4php/download.html</a>, dropped it into<br>
include/log4php, deleted the old log4php and log4php.debug folders,<br>
and replaced include/logging.php with<br>
<br>
require_once(&#39;config.php&#39;);<br>
require_once(&#39;include/log4php/Logger.php&#39;);<br>
<br>
@include_once(&#39;config.performance.php&#39;);<br>
global $PERFORMANCE_CONFIG;<br>
if(isset($PERFORMANCE_CONFIG) &amp;&amp;<br>
isset($PERFORMANCE_CONFIG[&#39;LOG4PHP_DEBUG&#39;]) &amp;&amp;<br>
$PERFORMANCE_CONFIG[&#39;LOG4PHP_DEBUG&#39;]) {<br>
        Logger::configure(&#39;log4php.debug.properties&#39;);<br>
} else {<br>
        Logger::configure(&#39;log4php.properties&#39;);<br>
}<br>
<br>
class LoggerManager {<br>
        static function getlogger($name = &#39;ROOT&#39;) {<br>
                return Logger::getLogger($name);<br>
        }<br>
}<br>
<br>
I avoided s/LoggerManager/Logger/g for now, but that class is now<br>
easily deleted.  I&#39;m not seeing any performance hit hammering my<br>
sandbox (virtual machine, 512MB, 1/4 Opteron CPU).  I don&#39;t see any<br>
mailing list archives -- would whoever had the original performance<br>
problems like to weigh in?  I think this is the right direction to<br>
take the code, but I don&#39;t have a load test environment.<br>
_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br>
</blockquote></div><br></div>