Re: LoggingEvent ClassCastException

2002-06-10 Thread Steve Ebersole
I have used log4j to send LoggingEvent object through JMS to Weblogic 5.10, 6.0, and 6.1, but have never seen a problem such as this. Not quite sure what you mean by "assigning the categoryName ... during deserialization". What are the steps you are performing when this occurs? - Original M

RE: Re[4]: Logging while initializing config file question...

2002-06-10 Thread Marvin Chase
Jake, Your configuration is correct, however if your LogLog.debug messages are executed before you configure your logging system, your debug messages will not show up. The only messages that will show up (before your configure) are LogLog error and warn messages. The config that you supply in y

Re[4]: Logging while initializing config file question...

2002-06-10 Thread Jacob Kjome
Hello Marvin, hmmm I have my log4j.xml config file set up like: I see all of log4j's internal statements, but I don't see any LogLog.debug(String) statements being printed out at all (that were being printed out before when I used System.out.println(), so I know I should be seeing the mess

RE: Re[2]: Logging while initializing config file question...

2002-06-10 Thread Marvin Chase
If you want to log before your log system initializes, you can use org.apache.log4j.helpers.LogLog methods error and warn. Log4j uses these methods internally to print out log messages. Messages logged using these methods will print out to console (System.err). Note that a debug method is also

Re[2]: Logging while initializing config file question...

2002-06-10 Thread Jacob Kjome
Thanks, that is good information that I didn't know. However, what if I want to put out my own messages within my init servlet. This is before any calls to configure(). I do a bunch of checking to make sure that file path passed to the servlet exists and whether the webapp is running off the f

RE: Logging while initializing config file question...

2002-06-10 Thread Thomas Tuft Muller
Assuming that you're using XMLConfigurator, you can use the following adjuration in your config file: This will cause Log4j to issue log statements to System.out during initialization and at some other occasions (e.g. when files roll etc). Error messages will be dumped to System.err irrespectiv

RE: Logging while initializing config file question...

2002-06-10 Thread Swami Iyer
In the properties file you can set log4j.debug=true and log4j.warn=true, which will show more insight on what is happening during those method calls. Swami > -Original Message- > From: Jacob Kjome [mailto:[EMAIL PROTECTED]] > Sent: June 10, 2002 2:03 PM > To: Log4J Users List > Subject:

Logging while initializing config file question...

2002-06-10 Thread Jacob Kjome
What does one do during configuration of Log4j? For instance, when one calls PropertyConfigurator.configure(file) or PropertyConfigurator.configureAndWatch(file), what kind of logging is available to see what is happening during this? Do you just bite but bullet and do System.out.println(String

LoggingEvent ClassCastException

2002-06-10 Thread Marvin Chase
Guys, I'm experiencing a strange class cast exception when deserializing a LoggingEvent. This exception does not occur consistently. I have implemented a custom JMSAppender which sends log messages (LoggingEvent classes) via JMS. Many times the app will operate without exception, but sometime

Re: ClassCastException when I extend Logger

2002-06-10 Thread Ceki Gülcü
Extending the Logger class is strongly discouraged. Anyway, the examples file mycat.good had a mistake. I have attached a corrected version. Try it first before continuing. HTH, At 17:18 10.06.2002 -0700, you wrote: >Hi >I have extended org.apache.log4j.Logger and have implemented the >logge

ClassCastException when I extend Logger

2002-06-10 Thread Sinead Whelan
Hi I have extended org.apache.log4j.Logger and have implemented the loggerfactory interface. (When I say that I did this...I mean that I copied the examples and maed a few minor changes!) My xml configuration file looks like http://jakarta.apache.org/log4j/";>

Re: JDBCAppender - log connection pooling code to db?

2002-06-10 Thread Kevin Steppe
Where you override getConnection()/closeConnection() you should call errorHandler.error(...) when you have problems. Bomb Diggy wrote: >Using the JDBCAppender by Kevin Steppe - the one >provided in the 'jdbc' package with 1.2.3. I've >overridden the getConnection() and closeConnection() >me

RE: JDBCAppender - log connection pooling code to db?

2002-06-10 Thread Thomas Tuft Muller
To me at seems quite obvious that logging erronous behaviour in a sink to the very same sink is asking for trouble. It's like trying to log to a file that you can't open that file, or to a socket that you can't open the socket. For the same reason Log4j uses LogLog and not itself for internal logg

JDBCAppender - log connection pooling code to db?

2002-06-10 Thread Bomb Diggy
Using the JDBCAppender by Kevin Steppe - the one provided in the 'jdbc' package with 1.2.3. I've overridden the getConnection() and closeConnection() methods of this class to use my Connection Pooling mechanism (a couple of Java classes). My questions is whether it's possible, or just a valid/

RE: Filters and configuration

2002-06-10 Thread Thomas Tuft Muller
Mark is absolutely right, the javadoc for PropertyConfigurator reads: "The PropertyConfigurator does not handle the advanced configuration features supported by the DOMConfigurator such as support for Filters, custom ErrorHandlers, nested appenders such as the AsyncAppender, etc." I sugguest sta

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 event occurs, which

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.EJB3. Logger creat