You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Donna Awald <da...@empagio.com> on 2002/05/07 19:11:31 UTC

Running log4j on a SuSE Linux/S390 System

We developed a Java application on the Intel platform and incorporated the
use of log4j to create a debug file for us.  We ported the application over
to a SuSE V7 (kernal 2.4.7) Linux on IBM S/390 machine, and it has severe
performance problems.  On the Intel platform, when we turn "debug" on, we do
not notice any performance degradation.  The transactions run is seconds.
When we port it over to run on the Linux/S390 platform, the transactions run
in the equivalent time as the Intel with debug turned off.  But when it is
turned on (log4j creating the debug file), it takes about 2 minutes to run.
The amount of data is writes is equivalent on both platforms, about 900,000
bytes.  We have configured on both platforms Tomcat 4.0.3 (transactions are
running through Tomcat).  On the Intel we have Sun Java, and on the IBM
platform we have IBMJava 1.3.1.  

I have several questions, first, have you heard of this problem before?  Is
there a solution to it.  If you haven't heard of it before, is there
something in the log4j code that goes down to machine code level that could
cause this degradation?  

I asked my developer exactly how he was using log4j, so that may help you.
He said:

I call the following methods of the Logger class in the order they are
listed:

exists(String)
getLogger(String)
removeAllAppenders()
addAppender(FileAppender)
setLevel(int)

All those occur at file creation time.  The one that is called all over the
place to actually write a record is:

debug(String)

Also, our pattern layout is:

%C{1} %L %m%n


Any help you could give, would be greatly appreciated.

Donna Awald
Director of Systems Architecture
Empagio 
"Creating Harmony in Human Resources"
dawald@empagio.com          
http://www.empagio.com

(678) 931-3016 (office)
(678) 931-3001 (Fax)




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Log4j in a shared JVM application?

Posted by Joe Polanik <jP...@cds.duke.edu>.
I have an application using JSP/servlets with a MySQL database. I develop 
on Windoze running Tomcat as local host, but deploy to a hosting service 
running Tomcat (shared JVM) on a linux platform (the 'public site'). I'm 
attempting to use log4j 1.1.3 for logging purposes.

The problem: Everything runs just fine on my machine but not on the public 
site. (How many times have you heard that one!?). On the public site the 
app works but fails to log anything. So I thought I'd ask for advice.

First, has anyone had problems using log4j in an app sitting in a shared JVM?

I'm using a log4j.properties file located in /WEB-INF/classes to create a 
Rolling File Appender. I'm wondering how to state the path to the log file 
(log/myLogFile.log) if config.getRealPath("/") gives /home/trionica but 
System.getProperty("user.dir") gives /<path to Tomcat>/.

Would I say /home/trionica/log/myLogFile.log or /<path to Tomcat>/<maybe 
something here>/log/myLogFile.log?

Any help would be greatly appreciated.

Thanks,

jPolanik@cds.duke.edu



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Running log4j on a SuSE Linux/S390 System

Posted by Ceki Gülcü <ce...@qos.ch>.
At 13:11 07.05.2002 -0400, you wrote:
>We developed a Java application on the Intel platform and incorporated the
>use of log4j to create a debug file for us.  We ported the application over
>to a SuSE V7 (kernal 2.4.7) Linux on IBM S/390 machine, and it has severe
>performance problems.  On the Intel platform, when we turn "debug" on, we do
>not notice any performance degradation.  The transactions run is seconds.
>When we port it over to run on the Linux/S390 platform, the transactions run
>in the equivalent time as the Intel with debug turned off.  But when it is
>turned on (log4j creating the debug file), it takes about 2 minutes to run.
>The amount of data is writes is equivalent on both platforms, about 900,000
>bytes.  We have configured on both platforms Tomcat 4.0.3 (transactions are
>running through Tomcat).  On the Intel we have Sun Java, and on the IBM
>platform we have IBMJava 1.3.1.
>
>I have several questions, first, have you heard of this problem before?  Is
>there a solution to it.  If you haven't heard of it before, is there
>something in the log4j code that goes down to machine code level that could
>cause this degradation?
>
>Also, our pattern layout is:
>
>%C{1} %L %m%n

Read the documentation:

http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/PatternLayout.html

The %C %F %L and %M conversions are known to be slow. This was reported on AIX,
Solaris, and apparently also on Linux/S390. In practice, the only platform 
where
%C %F %L and %M performs well is Windows NT/2000/XP.



--
Ceki


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>