RE: Logging from appender

2008-09-11 Thread Patrick . Grimard
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)

RE: Logging from appender

2008-09-11 Thread Bruno Melloni
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

RE: Logging from appender

2008-09-11 Thread Patrick . Grimard
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

RE: Logging from appender

2008-09-11 Thread Bruno Melloni
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

Re: Logging from appender

2008-09-11 Thread Patrick . Grimard
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

Logging from appender

2008-09-11 Thread Bruno Melloni
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

logging all messages of one level (and only that level) to one file

2008-09-11 Thread Guy
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

RE: static log4j configuration statement

2008-09-11 Thread Michael Erskine
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

RE: [SPAM (Bayesain Analysis)] - RE: static log4j configuration statement - Bayesian Filter detected spam

2008-09-11 Thread Bender Heri
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

RE: Logger object and change filename

2008-09-11 Thread Bender Heri
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