[Vtigercrm-developers] apache log4php 2.1.0

Prasad prasad at vtiger.com
Thu Dec 8 10:22:33 PST 2011


Adam,

We found most of the time spent in log4php was parsing the xml
configuration etc...
through xdebug even wheng log level was configured to FATAL and log->debug
was invoked.

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

Regards,
Prasad


On Wed, Dec 7, 2011 at 2:14 AM, Adam Heinz <amh at metricwise.net> wrote:

> I recently noticed that log4php/LoggerManager.php has the comment /**
> Classes to avoid logging */.  This seems a bit counterintuitive to me
> -- I would think it would be as simple as dialing down log levels in
> log4php.properties, unless the underlying library is painfully slow.
> I grabbed the latest tarball from
> http://logging.apache.org/log4php/download.html, dropped it into
> include/log4php, deleted the old log4php and log4php.debug folders,
> and replaced include/logging.php with
>
> require_once('config.php');
> require_once('include/log4php/Logger.php');
>
> @include_once('config.performance.php');
> global $PERFORMANCE_CONFIG;
> if(isset($PERFORMANCE_CONFIG) &&
> isset($PERFORMANCE_CONFIG['LOG4PHP_DEBUG']) &&
> $PERFORMANCE_CONFIG['LOG4PHP_DEBUG']) {
>        Logger::configure('log4php.debug.properties');
> } else {
>        Logger::configure('log4php.properties');
> }
>
> class LoggerManager {
>        static function getlogger($name = 'ROOT') {
>                return Logger::getLogger($name);
>        }
> }
>
> I avoided s/LoggerManager/Logger/g for now, but that class is now
> easily deleted.  I'm not seeing any performance hit hammering my
> sandbox (virtual machine, 512MB, 1/4 Opteron CPU).  I don't see any
> mailing list archives -- would whoever had the original performance
> problems like to weigh in?  I think this is the right direction to
> take the code, but I don't have a load test environment.
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20111208/4310c558/attachment-0002.html 


More information about the vtigercrm-developers mailing list