Kamal Ahmed | 3 May 2007 22:10

Stress Testing Async Appender

Hi,
Can anyone point me to any info regarding Stress Testing of Log4J
Appenders, especially Async Appender.
Thanks,
-Kamal.
Curt Arnold | 3 May 2007 23:28
Picon
Favicon

Re: Stress Testing Async Appender

Don't know any off the top of my head, but keep in mind if you do  
find any that AsyncAppender was considerably rewritten for log4j  
1.2.13 (could be off on the version number, definitely in .14 the  
current release) to eliminate a couple of different issues, so the  
behavior should be significantly improved relative to earlier  
releases.  If you have any concerns regarding it, you should upgrade  
if you are using an earlier version.

On May 3, 2007, at 3:10 PM, Kamal Ahmed wrote:

> Hi,
> Can anyone point me to any info regarding Stress Testing of Log4J
> Appenders, especially Async Appender.
> Thanks,
> -Kamal.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe <at> logging.apache.org
> For additional commands, e-mail: log4j-user-help <at> logging.apache.org
>
Edwin Lee | 4 May 2007 05:04
Picon
Favicon

Logging For Multi-Threaded Application

Hi all,

i have a multi-threaded application that needs to log to a single log file, and
am wondering which of the following would yield better performance:

1. Keeping several org.apache.log4j.Logger instances, one for each thread,
configured using the same properties file (and hence all log to the same log
file).

2. Use a single org.apache.log4j.Logger instance for every thread.

Advice, please?

Thanks in Advance,
Edwin

      
__________________________________ 
Yahoo! Movies - Search movie info and celeb profiles and photos. 
http://sg.movies.yahoo.com/
James Stauffer | 4 May 2007 05:13
Picon

Re: Logging For Multi-Threaded Application

#2 is commonly done for multi-threaded applications.

On 5/3/07, Edwin Lee <edwin11_1979 <at> yahoo.com.sg> wrote:
> Hi all,
>
> i have a multi-threaded application that needs to log to a single log file, and
> am wondering which of the following would yield better performance:
>
> 1. Keeping several org.apache.log4j.Logger instances, one for each thread,
> configured using the same properties file (and hence all log to the same log
> file).
>
> 2. Use a single org.apache.log4j.Logger instance for every thread.
>
> Advice, please?
>
>
>
> Thanks in Advance,
> Edwin
>
>
>
>
> __________________________________
> Yahoo! Movies - Search movie info and celeb profiles and photos.
> http://sg.movies.yahoo.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe <at> logging.apache.org
(Continue reading)

geff henderson chang | 4 May 2007 05:26
Picon

Re: Logging For Multi-Threaded Application

This is done through the getInstance() method, I believe.

On 5/4/07, James Stauffer <stauffer.james <at> gmail.com> wrote:
> #2 is commonly done for multi-threaded applications.
>
> On 5/3/07, Edwin Lee <edwin11_1979 <at> yahoo.com.sg> wrote:
> > Hi all,
> >
> > i have a multi-threaded application that needs to log to a single log file, and
> > am wondering which of the following would yield better performance:
> >
> > 1. Keeping several org.apache.log4j.Logger instances, one for each thread,
> > configured using the same properties file (and hence all log to the same log
> > file).
> >
> > 2. Use a single org.apache.log4j.Logger instance for every thread.
> >
> > Advice, please?
> >
> >
> >
> > Thanks in Advance,
> > Edwin
> >
> >
> >
> >
> > __________________________________
> > Yahoo! Movies - Search movie info and celeb profiles and photos.
> > http://sg.movies.yahoo.com/
(Continue reading)

op132650c | 4 May 2007 15:34
Picon
Picon
Favicon

log4j tBufferedIO option

Hi,

I've created my Logger class with my methods, that uses a logger object with the
fileAppender. The logger object it's defined correctly and the fileAppender is
associated to the logger object.

The logger objects prints successfully to a file if i do:
fileAppender.setBufferedIO(false);

but, if i put:

fileAppender.setBufferedIO(true);

the logger won't print to file and i don't understand why. I don't do anything
especial with the bufferedIO when it's set to true or false. It's the same
code.

[code]

fileAppender.setBufferedIO(false);// or true
logger.addAppender(fileAppender);
// the level is setted to debug level.
logger.info("TEST");

[/code]

Can anyone give me an example with the BufferedIO working, or explain it to me,
how can i put to work this option.

I won't put the code here, because i've to several classes and this mail will
(Continue reading)

Curt Arnold | 4 May 2007 16:04
Picon
Favicon

Re: log4j tBufferedIO option


On May 4, 2007, at 8:34 AM, op132650c <at> mail.telepac.pt wrote:
> Can anyone give me an example with the BufferedIO working, or  
> explain it to me,
> how can i put to work this option.
>
> I won't put the code here, because i've to several classes and this  
> mail will
> become unreadable.
>
> Thanks,
> Pedro
>

It would be very helpful if you would mention the operating system,  
JVM version and version of log4j that you are seeing the issue.

Setting buffered IO, also prevents flush from being called after  
every logging statement.  It could be possible that the app is  
shutting down without flushing and closing the appenders.  If you  
have only logged a few messages then it is possible that everything  
is still in buffers of some sort or the other.  Does the behavior  
change if you call LogManager.shutdown() before exiting the application?
miro | 6 May 2007 16:13
Picon
Favicon

Initialize log4j in app tier


My application runs  on clustered environment.
I have multiple app servers and web servers each running on different jdks.
Initializing log4j in web tier I can perform with servlet at server startup
but in no app tier I donot want war module so  I will have only jar files
ejb's, in this case when  and where is the best palce to initialize log4j.
Thanks & Regards
Miro

--

-- 
View this message in context: http://www.nabble.com/Initialize-log4j-in-app-tier-tf3699728.html#a10345769
Sent from the Log4j - Users mailing list archive at Nabble.com.
Jacob Kjome | 6 May 2007 18:22
Favicon

Re: Initialize log4j in app tier


Depends on what you want to do.  Sounds like you have a single 
application running on each appserver.  In this case, just put 
log4j.jar and log4j.xml in the server's classpath and let Log4j 
initialize itself.  Alternatively, you can write a startup class for 
the appserver.  I know Weblogic defines a proprietary startup 
interface that you can package as part of the EAR file.  However, 
unless you are using a repository selector to separate logging for 
multiple applications under the app server, this is overkill.  I 
suppose it might also make sense if you deploy log4j.jar with the EAR 
and ***don't put it in the server classpath***.  In that case, 
though, you could let Log4j initialize itself by placing log4j.xml 
within the EAR making it available on the classpath.  If you use 
Weblogic, you could place log4j.jar in APP-INF/lib and log4j.xml in 
APP-INF/classes.

Jake

At 09:13 AM 5/6/2007, you wrote:
 >
 >My application runs  on clustered environment.
 >I have multiple app servers and web servers each running on different jdks.
 >Initializing log4j in web tier I can perform with servlet at server startup
 >but in no app tier I donot want war module so  I will have only jar files
 >ejb's, in this case when  and where is the best palce to initialize log4j.
 >Thanks & Regards
 >Miro
 >
 >
 >--
(Continue reading)

pawelt | 7 May 2007 14:07
Picon

SmtpAppender - separate emails problem


Is it possible to configure appender to sent the whole error stack messages
as one email message?
Using a default configuration each error line is sent as a separate email so
for following stack I got 6 emails 

2007-05-06 07:13:39,024 ERROR [STDERR] sun.awt.image.ImageFormatException:
Unsupported color
2007-05-06 07:13:44,071 ERROR [STDERR] 	at
sun.awt.image.JPEGImageDecoder.readImage(Native Method)
2007-05-06 07:13:49,118 ERROR [STDERR] 	at
sun.awt.image.Joder.produceImage(JPEGImageDecoder.java:119)
2007-05-06 07:13:54,181 ERROR [STDERR] 	at
un.awt.image.ISource.doFetch(InputStreamImageSource.java:246)
2007-05-06 07:13:59,228 ERROR [STDERR] 	at
sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
2007-05-06 07:14:04,321 ERROR [STDERR] 	at
sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)

Thanks in advance!
Pawel

--

-- 
View this message in context: http://www.nabble.com/SmtpAppender---separate-emails-problem-tf3703348.html#a10356187
Sent from the Log4j - Users mailing list archive at Nabble.com.

Gmane