Re: Logging only specific number of lines

2011-03-02 Thread Martin Nyolt
Hello Am 02.03.2011 22:47, schrieb Kannan G: Hi Since my application is in integration platform(Fuse) log files grow easily, so we thought of controlling it by logging only specific number of lines whenever exceptions are thrown. Is this possible with log4j to log specific number of lines say 3

Re: Log4j closes System.err

2011-02-28 Thread Martin Nyolt
On 28/02/11 16:26, Christian Grobmeier wrote: activateOptions calls WriterAppender.setWriter(), which first calls reset(), which in turn calls closeWriter(). see https://svn.apache.org/repos/asf/logging/log4j/trunk/src/main/java/org/apache/log4j/WriterAppender.java (the base class of ConsoleAppe

Re: Log4j closes System.err

2011-02-28 Thread Martin Nyolt
On 28.02.2011 16:07, Christian Grobmeier wrote: Looking at the source code, I cannot see what you mean - in consoleappender new streams are created, the writerappender is doing nothing. Were is it closed? As far as I can see only the previous stream is closed, once you set a new one. But in thi

Re: Log4j closes System.err

2011-02-28 Thread Martin Nyolt
On 28.02.2011 15:52, Christian Grobmeier wrote: If I don't call "app.activateOptions()", the follow-option wouldn't take effect (and I do need "follow" to be true). But activateOptions finally calls WriterAppender.reset, which calls ConsoleAppender.close and closes the previous output stream, in

Re: Log4j closes System.err

2011-02-28 Thread Martin Nyolt
No idea, anyone? Appearently, this has to work somehow, since using a configuration file you can set the follow-option to be true without closing any stream. But I never found any hint how to do this. Am 18.02.2011 15:01, schrieb Martin Nyolt: Hello, I use the following code to load a default

Log4j closes System.err

2011-02-18 Thread Martin Nyolt
Is this a misbehaviour of log4j, or am I incorrectly using the API? Best regards Martin Nyolt - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org