Dear all :
We have requirement that all logs should be written.
If someone deletes the files; No exception is thrown. We use
DailyRollyingFileAppender.
Can some one plz guide me on the issue.
What I noticed is QuietWriter.write method does not throw IOexception. Problem
may be due to unix. BUT it there a way to get execption
public class QuietWriter extends FilterWriter {
public
void write(String string) {
try {
System.out.println("Writting in CustomQuiet 1"+ string);
out.write(string);
System.out.println("Writting in CustomQuiet 2"+ string);
} catch(IOException e) {
System.out.println("Failed to write ["+string+"]."+
ErrorCode.WRITE_FAILURE);
e.printStackTrace();
errorHandler.error("Failed to write ["+string+"].", e,
ErrorCode.WRITE_FAILURE);
}
catch(Exception e) {
System.out.println("Failed to write ["+string+"]."+
ErrorCode.WRITE_FAILURE);
e.printStackTrace();
errorHandler.error("Failed to write ["+string+"].", e,
ErrorCode.WRITE_FAILURE);
}
-----Original Message-----
From: Frank Kim [mailto:[email protected]]
Sent: Saturday, February 21, 2009 4:27 AM
To: [email protected]
Subject: prevent throttling of logs
In our production system, we log to the file system and to the DB.
In the event of a catastrophic failure in olmApp the same error gets
logged over and over again to not only the server.log file, but also to
the db. To prevent us from filling the disk on either the app server or
the db server, we need to put some throttling in place.
Does log4j have the ability to do this? It was not obvious to me how to
do this after looking through the FAQ and the documentation.
For the file system we use
org.jboss.logging.appender.DailyRollingFileAppender and for the DB we
use our own DataSourceAppender which extends
org.apache.log4j.jdbc.JDBCAppender.
We are running on JBoss 4.0.4.GA.
Thanks,
Frank
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
This e-mail and all material transmitted with it are for the use of the
intended recipient(s) ONLY and contains confidential and/or privileged
information. If you are not the intended recipient, please contact the sender
by reply e-mail and destroy all copies and the original message. Any
unauthorized review, use, disclosure, dissemination, forwarding, printing or
copying of this email or any action taken pursuant to the contents of the
present e-mail is strictly prohibited and is unlawful.
The recipient acknowledges that Bharti Telesoft Limited or its management or
directors, are unable to exercise control or ensure the integrity over /of the
contents of the information contained in e-mail. Any views expressed herein are
those of the individual sender only and no binding nature of the contents shall
be implied or assumed unless the sender does so expressly with due authority of
Bharti Telesoft Limited. E-mail and any contents transmitted with it are prone
to viruses and related defects despite all efforts to avoid such by Bharti
Telesoft Limited.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]