Hi,
There are always going to be difference between any two systems designed
to do the same thing.  Your system was obviously designed for your
needs, and probably not much more.  Log4j is designed to be generic,
useful to a very broad range of people / applications, easily
extensible, and yet fast.  

At my organization, we carefully compared five or six in-house custom
logging systems and a couple of 3rd party ones.  We included very
detailed performance comparisons and profilings.  We found log4j to be
as fast or faster than nearly all the other implementation, while
providing the best range of features.  As we need a lot of its features
(JDBC logging, SMTP logging, runtime configurability, JMS logging, daily
rolling, appender thresholds, object renderers, etc), we picked log4j,
and have been very very happy since.

So it's a question of what you need from your logging system.  If your
system did everything you need, you probably wouldn't even be
considering log4j, right? ;)  Maybe it';; easier to add just the
features you need to your own system, instead of migrating to log4j
completely?

The point is, if you want to help tune log4j you're welcome to.  It's
open source and contributors are always welcome, right Ceki? ;)
However, having used log4j in numerous apps from very small to very
large, we've never had any complaints about its performance.  There was
always a lot of tuning to be done on our own apps before logging
performance showed up as a blip on the profiler screen...

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: sk k [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, September 03, 2002 10:30 AM
>To: [EMAIL PROTECTED]
>Subject: Performance between Log4j and custom in-house logger
>
>Hi,
>
>We are planning to move from a custom in house logging
>framework (MyLogger) to using Log4j and have been
>doing some performance comparison between log4j and
>MyLogger.
>
>The numbers seem to be favoring mylogger over log4j.
>
>
>Sample Numbers
>==============
>Note: Timing includes logj startup time, mylogger
>startup time and junitperf startup time.
>
>1) Logging 2 strings, each of size: 128bytes
>
>Request MyLogger(sec) Log4j(sec)
>======  =======       =========
>100    1.22    1.29
>1000   1.67    1.71
>2000   2.12    2.01
>
>
>
>2) Logging 4 strings, each of size: 128bytes
>
>Request MyLogger(sec) Log4j(sec)
>======  =======       =========
>100    1.21    1.25
>1000   1.653   1.82
>2000   2.24    2.56
>
>
>3) Logging 8 strings, each of size: 128bytes
>
>Request MyLogger(sec) Log4j(sec)
>======  =======       =========
>100    1.35    1.35
>400    1.56    1.71
>900    1.8     2.35
>
>4) Logging 80 strings, each of size: 128bytes
>
>Request MyLogger(sec) Log4j(sec)
>======  =======       =========
>100    1.251   1.7
>1000   1.81    6.1
>2000   2.15    11.2
>
>
>Sample code and configuration
>===========================
>log4j.properties
>==============
>log4j.rootCategory=DEBUG,dest1
>
>log4j.appender.dest1=org.apache.log4j.RollingFileAppender
>log4j.appender.dest1.layout=org.apache.log4j.SimpleLayout
>log4j.appender.dest1.File=c:/skk/cps/logger/test/test1.log
>log4j.appender.dest1.MaxFileSize=4MB
>log4j.appender.dest1.MaxBackupIndex=60
>
>
>log4j.category.ut.log.Log4jPerfTest=DEBUG,dest2
>log4j.additivity.Log4jPerfTest=false
>log4j.appender.dest2=org.apache.log4j.RollingFileAppender
>log4j.appender.dest1.layout=org.apache.log4j.TTCCLayout
>
>log4j.appender.dest2.File=c:/skk/cps/logger/test/test.log
>log4j.appender.dest2.MaxFileSize=4MB
>log4j.appender.dest2.MaxBackupIndex=60
>
>Test Logger code
>===============
>
>Note: logMsgs is an array with strings of size 128
>bytes.
>
>   public void test_Log4j() throws Exception {
>
>        int size = logMsgs.size();
>
>        for( int i=0; i<size; i++ ) {
>            log4jLogger.info( (String)logMsgs.get(i)
>);
>        }
>
>    }
>
>Some of my questions
>
>1) Is there anything that I can do to increase the
>performance of log4j on my box( Pentium-3, 800Mhz,
>512MB RAM)
>
>2) I see some architectural difference between the way
>mylogger and log4j is implemented namely
> My logger does formatting&writing to log file in a
>background thread whereas it seems that log4j doesn't
> seem do the same. Is this true.
> My logger uses the concept of observer and
>observable.
>
>
>Thanks.
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Finance - Get real-time stock quotes
>http://finance.yahoo.com
>
>--
>To unsubscribe, e-mail:   <mailto:log4j-user-
>[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:log4j-user-
>[EMAIL PROTECTED]>

This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to