How about calling the subAppend(LoggingEvent) method within your appender? That
would prevent the append() method from being called recursively since your disk
utilization check is located there.
(Embedded image moved to file: pic15141.jpg)
The disk utilization check is called form inside the 'append' process...
that is why it would be messy.
As I said in the original email, there probably is a specific Log
class/method already in log4j intended for logging from inside an
appender. It would be consistent with log4j's design. But
I'm using a RollingFileAppender in my logging. It extends FileAppender, which
extends WriterAppender. The WriterAppender has an "append" method which takes a
LoggingEvent object as a parameter. Is your appender a subclass of
WriterAppender or some other class that extends WriterAppender? You co
Sorry, I think I got misunderstood. I have no problem with
levels/thresholds when logging from the app.
What I want to do is generate an additional log message from INSIDE the
appender code, WHILE it is about to process an application message.
bruno
-Original Message-
From: [EMAIL PROT
I'm not an expert on Log4j, but recently had a similar requirement. I didn't
want debug messages appearing on the console. So on my console appender, I set
a threshold like this:
log4j.appender.CA.Threshold=INFO
I got that from somebody else on this list. This way I only see INFO messages
and
What is the best way to send a message to the log from inside the
Appender itself? (separate from the message that the appender is
currently processing)
Why do I even ask this? My appender checks disk utilization every hour.
I'd like to record the % of disk utilized in the log.
I tried usin
Hi,
In short what I want to do is to create a log that will log all my
exceptions to one file (but only the exceptions). Other functionality is
also needed so I will create an appender (that has been succesfull). But
somehow
So if i get an exception I would like to call the following:
logger.exce
Bender Heri [mailto:[EMAIL PROTECTED] wrote:
> Just put your property file into the classpath and you do not have to
> worry about initialization of log4j framework. It does it automagically
> when you fetch the first logger.
> Heri
Whilst that might be perfectly correct it is not what I'm attemp
Just put your property file into the classpath and you do not have to
worry about initialization of log4j framework. It does it automagically
when you fetch the first logger.
Heri
> -Original Message-
> From: Michael Erskine [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 10, 2008
At the code location where a particular Thread knows about processing a
distinct element you put a identifying information into MDC, after
having processed remove the info again. MDC values are kept on a per
Thread basis. This info can be used by the MultifileAppender (when
processing a log call) o
10 matches
Mail list logo