RE: AsyncAppender ...

2003-09-25 Thread Ravindranath Yagatili Venkata
way, I have to extend it from the | AsyncAppender. How would I use this for ConsoleAppender and | JDBCAppender? | Any example would be great. value="%d{ABSOLUTE} - %m%n" /> | 2. How does log4J scale, in terms of threading and volume, let's say | currently I have 100

RE: AsyncAppender ...

2003-09-25 Thread Thomas Muller
| AsyncAppender. How would I use this for ConsoleAppender and | JDBCAppender? | Any example would be great. | 2. How does log4J scale, in terms of threading and

AsyncAppender ...

2003-09-24 Thread Ravindranath Yagatili Venkata
Hi, I am fairly new to Log4J and I have the following questions. By default if I use the ConsoleAppender or any other appender other than AysncAppender, they are all synchronous. Correct? 1. To use the appender in an aysnc way, I have to extend it from the AsyncAppender. How would I use

AsyncAppender Settings in config file?

2003-07-08 Thread Vivek Kapadekar
Hi I wrote my own appender and have wrapped it in a AsyncAppender and got it working. But i do the addition of this appender to the logger, and setting of properties inside code. Can I do this in log4j.properties ? Thanks --Viv Howdy, There's not already a PatternLayout optio

Re: attach appender to AsyncAppender in config file....]

2003-06-12 Thread Ceki Gülcü
The AsyncAppender cannot be set a config file in properties format. This is documented in the javadocs for PropertyConfigurator. The PropertyConfigurator does not handle the advanced configuration features supported by the DOMConfigurator such as support for Filters, custom ErrorHandlers

attach appender to AsyncAppender in config file....]

2003-06-12 Thread Vivek Kapadekar
Does someone know the trick for this? How do I attach an appender to AsyncAppender in the config file ( log4j.properties )? Thanks -Viv

attach appender to AsyncAppender in config file....

2003-06-12 Thread Vivek Kapadekar
Hi How do I attach an appender to AsyncAppender in the config file ( log4j.properties )? In general what is the semantics or a set of all valid entries that can go in the log4j.properties file? Thanks -Viv

Re: REPOST: AsyncAppender assistance

2003-02-18 Thread Ferenc Toth
PST), Anuj Agrawal wrote: >Sorry for the repost. Any help on this, anyone, please? >Anuj. > >--- Anuj Agrawal <[EMAIL PROTECTED]> wrote: >> Date: Wed, 5 Feb 2003 06:19:27 -0800 (PST) >> From: Anuj Agrawal <[EMAIL PROTECTED]> >> Subject: AsyncAppend

Re: REPOST: AsyncAppender assistance

2003-02-18 Thread Ceki Gülcü
Why don't you test AsyncAppender to find out the answer? Or read the code? In short, the answer is that AsyncAppender will block when its buffer is full. At 07:34 18.02.2003 -0800, you wrote: Sorry for the repost. Any help on this, anyone, please? Anuj. --- Anuj Agrawal <[EMAIL P

REPOST: AsyncAppender assistance

2003-02-18 Thread Anuj Agrawal
Sorry for the repost. Any help on this, anyone, please? Anuj. --- Anuj Agrawal <[EMAIL PROTECTED]> wrote: > Date: Wed, 5 Feb 2003 06:19:27 -0800 (PST) > From: Anuj Agrawal <[EMAIL PROTECTED]> > Subject: AsyncAppender assistance > To: [EMAIL PROTECTED] > > Hi All

AsyncAppender assistance

2003-02-05 Thread Anuj Agrawal
, which when reached would spit out the logs in the buffer to a file(s). This file(s) would then subsequently be read in by that separate thread at a later time (yes, the order of the logs are not important for me). Given the above scenario, it looks like i ought to be using the AsyncAppender, but i&

RE: Running out of memory using AsyncAppender

2003-01-03 Thread Selwyn Samuel
Thomas/Ceki, I am using the default buffer size (128) for the AsyncAppender and I am not creating any appenders programmatically. I shall try the alternative appenders and let you know how it works for us. --Selwyn >>> [EMAIL PROTECTED] 01/03/03 11:57AM >>> Selwyn, I don&

RE: Running out of memory using AsyncAppender

2003-01-03 Thread Thomas Muller
Selwyn, I don't think the out-of-memory error is related to Log4j's AsyncAppender (of anything in Log4j for that matter). As long as you don't explicitly increase the buffersize, it's memory consumption should be constant. Are you creating appenders programmatically? In case

Re: Running out of memory using AsyncAppender

2003-01-03 Thread Ceki Gülcü
What is your value of the BufferSize option? I suggest values under 256, in particular the default value of 128 should work well. AsyncAppender has been tested for memory leaks so I am somewhat surprised by the reported OutOfMemoryException. At 09:24 03.01.2003 -0700, you wrote: Thanks Thomas

Re: Running out of memory using AsyncAppender

2003-01-03 Thread Selwyn Samuel
m with AsyncAppender is that it runs in a one-per-instance thread >>and it has a fixed buffer size. A more effective AsyncAppender would share a >>single thread (or maybe use a thread pool) between all instances. It would >>also use a linked list for storing log events instead of a fixed s

RE: Running out of memory using AsyncAppender

2003-01-03 Thread Thomas Muller
| How many AsyncAppenders are you running? Many. | >A more effective AsyncAppender would share a | >single thread (or maybe use a thread pool) between all | instances. It would | >also use a linked list for storing log events instead of a fixed size | >buffer. This would also solve a

Re: Running out of memory using AsyncAppender

2003-01-03 Thread Ceki Gülcü
What do you mean you are running out of memory? Do you get an OutOfMemoryException? At 12:12 02.01.2003 -0700, you wrote: I am using AsyncAppender/FileAppender to log messages for my application. There are around 40 to 50 threads that would log messages at a given point in time. I have my VM

RE: Running out of memory using AsyncAppender

2003-01-03 Thread Ceki Gülcü
At 10:39 03.01.2003 +, you wrote: Selwyn, Have you considered increasing the stack/heap size? Read the documentaion for the -Xmx -Xss java JVM options. The problem with AsyncAppender is that it runs in a one-per-instance thread and it has a fixed buffer size. How many AsyncAppenders are

RE: Running out of memory using AsyncAppender

2003-01-03 Thread Thomas Muller
Selwyn, Have you considered increasing the stack/heap size? Read the documentaion for the -Xmx -Xss java JVM options. The problem with AsyncAppender is that it runs in a one-per-instance thread and it has a fixed buffer size. A more effective AsyncAppender would share a single thread (or maybe

Running out of memory using AsyncAppender

2003-01-02 Thread Selwyn Samuel
I am using AsyncAppender/FileAppender to log messages for my application. There are around 40 to 50 threads that would log messages at a given point in time. I have my VM max memory size at 256m and I very quickly run out of memory in less than 5 minutes. If I use just the FileAppender the memory

RE: AsyncAppender only with XML file?

2002-12-09 Thread Thomas Muller
| Is it true? Yes. If you consult the javadoc for org.apache.log4j.AsyncAppender in log4j, you will find the statement: "Important note: The AsyncAppender can only be script configured using the DOMConfigurator." Hope this helps.

AsyncAppender only with XML file?

2002-12-09 Thread [EMAIL PROTECTED]
Hi All, I've found in this newsgroup (http://www.mail-archive.com/log4j-user@jakarta.apache.org/msg06389.html and http://www.mail-archive.com/log4j-user@jakarta.apache.org/msg03327.html) that "AsyncAppender can only be created from config files using the XML config."

Re: AsyncAppender

2002-09-12 Thread Ceki Gülcü
The AsyncAppender does not wait for the buffer to be full but why should that be labeled as a problem? At 11:44 12.09.2002 +0200, you wrote: >Hello, > >I'm having problems when using an AsyncAppender, it doesn't seem to wait >for the buffer to be full, but writes th

AsyncAppender

2002-09-12 Thread Jose Luis Anta
Hello, I'm having problems when using an AsyncAppender, it doesn't seem to wait for the buffer to be full, but writes the logs one by one. My program writes one line of log each second, and I can see how they are written to the output file one by one. My xml configuration file seems

another AsyncAppender class question

2002-08-01 Thread Paul Voutier
s. I then wrote a test in which I added this appender to an AsyncAppender, which I then added to a logger. When I call close() on the logger (which calls AsyncAppender.close()), it takes 10 seconds (plus a tiny bit) for the main thread to complete. If I am doing things asynchronously, shouldn

Fwd: an AsyncAppender class

2002-08-01 Thread Ceki Gülcü
Paul, If you omit the join operation, you have no way of knowing when the appenders attached to the AsyncAppender have finished their work. If thinking that the previous AsyncAppender was closed, you immediately create another AsyncAppender that encapsulates appenders writing to the same system

Re: AsyncAppender dispatcher thread dies - no exception written to stderr

2002-07-09 Thread Ceki Gülcü
You can try to reproduce the problem by not using AsyncAppender. If you still get an out of memory error you know who to blame. At 18:21 09.07.2002 -0400, you wrote: >I have a large web application that has just begun failing with a gnarly >bug. >The AsyncAppender dispatcher thread di

AsyncAppender dispatcher thread dies - no exception written to stderr

2002-07-09 Thread Booth, Peter
I have a large web application that has just begun failing with a gnarly bug. The AsyncAppender dispatcher thread dies, which causes the thread that is writing to the async appnder to block, and then other threads to wait on the async appender's mutex heald by that blocked thread, which s

RE: OutOfMemoryError for AsyncAppender

2002-06-21 Thread Thomas Tuft Muller
WriterAppender and AsyncAppender both extends AppenderSkeleton, but are otherwise unrelated. AsyncAppender can't be configured via PropertyConfigurator. Your thread problem must stem from something else, because no AsyncAppender will be created in your app unless you configure its us

OutOfMemoryError for AsyncAppender

2002-06-21 Thread vivek gupta
hi all, I have a problem in using AsyncAppender. Whenever I uses RollingFileAppender which extends from FileAppender while inturn extends from WriteAppender which extends from AsyncAppender, a large number of threads are created and finally I got out of Memory Exception. My properties file is

RE: Log4J architecture - AsyncAppender

2002-06-10 Thread Thomas Tuft Muller
The AsyncAppender documentation reads "(..) The AsyncAppender uses a separate thread to serve the events in its bounded buffer (...)" Reading the code confirms this statement (surprisingly enough). A thread is started upon creation, and the thread is notified each time a log ev

Log4J architecture - AsyncAppender

2002-06-10 Thread Frissaer, Jeroen
Hi everyone, I would like to know more about how Log4J is architectured. More in particular the use of the AsyncAppender within a J2EE environment. Suppose I'v got 3 EJB's: EJB1, EJB2 and EJB3 that create loggers with names: TraceLogger.EJB1, TraceLogger.EJB2 and TraceLogger.EJB

Re: Problem closing and removing AsyncAppender

2002-04-04 Thread Ceki Gülcü
Hello Jean-François, Two possible explanations for the "log4j:ERROR Attempted to append ..." mesage: 1) You have myAsyncAppender attached to multiple loggers. 2) Are you sure myAsyncAppender is really attached to root and not somewhere else? BTW, how come your AsyncAppender is

Problem closing and removing AsyncAppender

2002-04-04 Thread JEAN-FRANCOIS DAUNE
Hi all, I have an AsyncAppender appended to the root category. I have a shutdown thread (registered using Runtime.addShutdownHook) that must be run when my program exits. In this thread, I log some traces. As I am in a shutdown process, I don't want the AsyncAppender to be operational i

AsyncAppender

2002-03-05 Thread xu_zhang
Hi everyone, I am using AsyncAppender inside Iplanet application server on Solaris. The JDK verions is 1.2. Does anyone know how we can make sure all the messages inside the buffer of AsyncAppender are logged before the application server shutdown? With a standalone application, I can call the

RE: problems using SocketAppender and AsyncAppender

2002-01-17 Thread Marc Carrion
about using the AsyncAppender in a different Thread but it really doesn't help. Finally we are using a JMS Server with the JMSAppender and everything works fine. Bye, Marc Original Message De: [EMAIL PROTECTED] Para: [EMAIL PROTECTED], Asunto: RE: problems using SocketAppend

RE: problems using SocketAppender and AsyncAppender

2002-01-17 Thread Max Stolyarov
our server would block, practicaly bringing everything to a stand still. Thinking alone the same lines as you did, I started to use AsyncAppender, but the problem did not go away. So, I started testing the client for problems, such as the fileAppender and the TextPaneAppender. What I discovered was

RE: problems using SocketAppender and AsyncAppender

2002-01-17 Thread Marc Carrion
Any help on that? Thanks, Marc Original Message De: [EMAIL PROTECTED] Para: [EMAIL PROTECTED], Asunto: RE: problems using SocketAppender and AsyncAppender Fecha: Tue, 15 Jan 2002 11:23:57 +0100 > Hello, we are using log4j in our application (configuring some >

problems using SocketAppender and AsyncAppender

2002-01-15 Thread Marc Carrion
for I/O and then the socket blocks too, and due to, the main thread too. Finally we decided to use the AsyncAppender, it should work asynchronous, it would use another thread to write so the main thread will never become blocked. But, if one of the SocketAppenders referenced in the AsyncAppender

RE: ArrayIndexOutOfBoundsException in AsyncAppender

2001-12-16 Thread Ceki Gulcu
-- >| From: Ceki Gulcu [mailto:[EMAIL PROTECTED]] >| Sent: 16 December 2001 11:31 >| To: Log4J Users List >| Subject: RE: ArrayIndexOutOfBoundsException in AsyncAppender >| >| >| >| Thomas, >| >| This is a very interesting comment. I disagree with it for the >| following r

RE: ArrayIndexOutOfBoundsException in AsyncAppender

2001-12-16 Thread Thomas Tuft Muller
omas | -Original Message- | From: Ceki Gulcu [mailto:[EMAIL PROTECTED]] | Sent: 16 December 2001 11:31 | To: Log4J Users List | Subject: RE: ArrayIndexOutOfBoundsException in AsyncAppender | | | | Thomas, | | This is a very interesting comment. I disagree with it for the | following reason. W

RE: ArrayIndexOutOfBoundsException in AsyncAppender

2001-12-16 Thread Ceki Gulcu
to:[EMAIL PROTECTED]] >| Sent: 14 December 2001 22:11 >| To: Log4J Users List >| Subject: Re: ArrayIndexOutOfBoundsException in AsyncAppender >| >| >| >| Thomas, >| >| Looks like a bug to me. Thanks for the info. The likely cause of >| this problem is that the &#

RE: ArrayIndexOutOfBoundsException in AsyncAppender

2001-12-16 Thread Thomas Tuft Muller
| Subject: Re: ArrayIndexOutOfBoundsException in AsyncAppender | | | | Thomas, | | Looks like a bug to me. Thanks for the info. The likely cause of | this problem is that the 'vw' static variable of type | VectorWriter is not accessed in a synchronized manner. You have | two threads trying to lo

Re: ArrayIndexOutOfBoundsException in AsyncAppender

2001-12-14 Thread Ceki Gulcu
Thomas, Looks like a bug to me. Thanks for the info. The likely cause of this problem is that the 'vw' static variable of type VectorWriter is not accessed in a synchronized manner. You have two threads trying to log an event containing an exception near simultaneously. One easy solution is

ArrayIndexOutOfBoundsException in AsyncAppender

2001-12-14 Thread Thomas Tuft Muller
Hi, This error inside the log4j API caused our server to hang (this trace was logged in system.err.) 2001-12-14 10:07:28,735 - "java.lang.ArrayIndexOutOfBoundsException: 0 >= 0" 2001-12-14 10:07:28,735 - " at java.util.Vector.elementAt(Vector.java:417)" 2001-12-14 10:07:28,745 - " at org

Re: AsyncAppender creating too many threads.....

2001-12-03 Thread Kevin Steppe
In your TracerLogger getCategory() method, you have: cat.addAppender( new AsyncAppender()); That (obviously) creates a new appender for -every- class. Try configuring once and putting the appender on the root category. Obviously you don't need a different appender for

AsyncAppender creating too many threads.....

2001-12-03 Thread Ajay Dhanawade
Hi All, I had poste dthis question earlier as well. I am havinn problem with the AsyncAppender. We are trying to implement the log4j in our J2EE application. When we start the application and monitor we see 80 threads created whereas the Weblogic server 6.0sp1 which we are usinf spawns max 30

RE: AsyncAppender questions

2001-10-16 Thread Thomas Tuft Muller
ation thread(s) blocks. -- Thomas | -Original Message- | From: Andrew B [mailto:[EMAIL PROTECTED]] | Sent: 16 October 2001 17:22 | To: [EMAIL PROTECTED] | Subject: AsyncAppender questions | | | Hi, | | The documentation for AsyncAppender doesn't really | help me figure out what it is

AsyncAppender questions

2001-10-16 Thread Andrew B
Hi, The documentation for AsyncAppender doesn't really help me figure out what it is useful for. Is it just for sending stuff to multiple appenders? Thanks Andrew = The geek shall inherit the earth. __ Do You Yahoo!? Make a

AsyncAppender with properties file

2001-08-23 Thread Naresh Sharma
Hello all,   The API docs suggests that "The AsyncAppender can only be script configured using the DOMConfigurator. " Any reasons ??? or any plans to support other like Propertiles file .   Thanks Naresh

Re: MDC and AsyncAppender

2001-08-16 Thread tmulle
cc: 08/16/2001 Subject: Re: MDC and AsyncAppender

Re: MDC and AsyncAppender

2001-08-16 Thread Ceki Gülcü
Are you using the latest code from our CVS repository? Ceki At 11:04 16.08.2001 -0400, [EMAIL PROTECTED] wrote: >Hi, > > How can I use the MDC context with the AsyncAppender? The code below >always makes the MDC come out empty, which I understand why. >I need to use the Async

MDC and AsyncAppender

2001-08-16 Thread tmulle
Hi, How can I use the MDC context with the AsyncAppender? The code below always makes the MDC come out empty, which I understand why. I need to use the AsyncAppenders and I also want to use the MDC and the %X since I don't want to make a code change everytime I add a new variable t

AsyncAppender vs. JMSAppender

2001-07-13 Thread Jamie Tsao
Title: AsyncAppender vs. JMSAppender Hi, I would like to asynchronously log messages (for performance reasons).  I know the AsyncAppender is designed for this purpose, but I believe there have been performance measures that don't necessary prove the case.  I was also thinking that I

Using AsyncAppender in an RMI server process

2001-04-27 Thread Mark Masterson
As long as I'm posting questions I've got a server process, which services applets via RMI. The server (not the applets) uses Log4J. If I use an AsyncAppender, does anybody have any suggestions for where/how I could invoke Category.shutdown? I'm used to doing that when

RE: Adding Appender to AsyncAppender from config file

2001-04-24 Thread Johnson, Clay
Yes. Like Category, AsyncAppender implements AppenderAttachable. The syntax is the same. DOMConfigurator example

Re: Adding Appender to AsyncAppender from config file

2001-04-24 Thread Tom Palmer
e know. > Currently in my config file I am using the RollingFileAppender with my > Category objects, can I specify from the config file that Category object > use the AsyncAppender which in turn uses the RollingFileAppender? > > Bill > > -

Adding Appender to AsyncAppender from config file

2001-04-24 Thread Griffith, Bill (ISS Southfield)
Hello, I am relatively new to log4j, so if I'm way off base with this question, feel free to let me know. Currently in my config file I am using the RollingFileAppender with my Category objects, can I specify from the config file that Category object use the AsyncAppender which in turn use

RE: AsyncAppender in linux

2001-02-13 Thread Kitching Simon
Hi Michiel, The benefit of the AsyncAppender is not that logging runs faster (ie log messages get written to disk faster), but that code which *calls* log methods runs faster, because it does not wait for the logged message to be written. In order to prove this, what you need is a very slow

Re: AsyncAppender in linux

2001-02-13 Thread Ceki Gülcü
Michiel, The usefulness or lack thereof of AsyncAppender is not dependent on the OS. The new JVMs do file buffering on all platforms. Don't confuse buffering of the file write operation with what AsyncAppender does. File buffering let you write large chunks to disk instead of writing

Re: AsyncAppender in linux

2001-02-13 Thread Michiel Meeuwissen
delay. That's the idea of AsyncAppender, isn't it? But the thing is, it also gets faster per logging if I don't use AsyncAppender. With about the same rate. At least, that's my provisional result. My explanation would be linux file buffering, which makes writing to files faster

Re: AsyncAppender in linux

2001-02-12 Thread Ceki Gülcü
Michiel, What kind of testing are you doing? What do you mean by logging gets faster? With respect to what? Cheers, Ceki At 10:59 12.02.2001 +0100, you wrote: >I did a little research if using the AsyncAppender would make >sense. So, I made a little program with delays in it etc,

AsyncAppender in linux

2001-02-12 Thread Michiel Meeuwissen
I did a little research if using the AsyncAppender would make sense. So, I made a little program with delays in it etc, as is suggested in the Logging javadoc of log4j. I do find no improvements tough in the performance, when using AsyncAppender. The thing is, that even without AsyncAppender