logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doug b <ummmm...@yahoo.com>
Subject Re: Major slowdown with high volume logging
Date Sat, 08 Dec 2001 05:06:51 GMT
you know that %M, %L, and %F have warnings in the docs
that say they're "extremely slow", right?  as your
pattern has 2 of them, i'll bet this is a big part of
the problem.

--- Carey Boldenow <c.boldenow@cytera.com> wrote:
> We are currently using version 1.1.3 of log4j, and
> within our database framework we are using log4j
> to log our jdbc database activity. We have one
> program that is rather database intensive, and when
> we have the logging level set to debug in our
> properties file (see below), the program takes
> nearly
> one hour to complete. However, if I adjust the
> logging level to error, the program finishes in
> about 
> 3 minutes. When the logging is set to debug, the
> file we are sending the logging output to does get
> to
> be about 10mb in size. However, if I convert the
> logging to System.out.println, the file is about as
> big,
> but the program still finishes in under 4 minutes.
> Any ideas as to why the dramatic hit on performance
> when
> the logging is set to debug? 
> 
> 
> # When the following two categories are set to
> debug, then the program takes 1 hour to complete,
> # when I change them to "error", then the program
> completes in 3 minutes.
> 
> log4j.rootCategory=debug, file
> log4j.category.DatabaseManager=DEBUG
> 
>
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
>
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> log4j.appender.stdout.layout.ConversionPattern=%d
> [%p] %m\n\tat %c.%M(%F:%L)\n
> 
>
log4j.appender.file=org.apache.log4j.RollingFileAppender
> log4j.appender.file.File=c:/jrun/logs/SQL.log
> log4j.appender.file.MaxFileSize=500KB
> # Keep one backup file
> log4j.appender.file.MaxBackupIndex=1
>
log4j.appender.file.layout=org.apache.log4j.PatternLayout
> log4j.appender.file.layout.ConversionPattern=%d [%t]
> %-5p (%F:%L) - %m%n
> 
> Thanks for your help!
> 
> Carey Boldenow
> 


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

--
To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>


Mime
View raw message