log4j conflict

2006-12-19 Thread AM
I'm experiencing the following: I've a Running Tomcat 5.0 with log4j-1.2.12.jar in $TOMCAT_HOME/shared/lib Wanted functioning: I have a library, let's say myLib.jar, which I put in $TOMCAT_HOME/shared/lib in order to let a few webapplications using it. The myLib library uses log4j too for

How to get all logging in the case of an error ?

2006-12-19 Thread Matthias Petersen
Hi, I have the following configuration: ConsoleAppender for INFO and ERROR SMTP-Appender for ERROR The problem is that I want to send a mail with the SMTP-Appender with all logging events in the case of an error, because when an errors occurs the INFO events contain additional informations (e.g.

Re: JDBCAppender with large message values

2006-12-19 Thread Mattias Andersson
Hi, Hi, I want to include the JDBCAppender as one of our appenders so that all error level messages will be written to a common database. The problem is that the message content frequently contains a stack trace which is too large for the database column. What I get right now is a row

RE: How to get all logging in the case of an error ?

2006-12-19 Thread Blok, Eelke
Hi Matthias, I would suggest to write your own appender that extends SMTPAppender and implements the desired logic of gathering related log messages, and sends them out when an error is received. You'd probably want to implement some mechanism that restricts the amount of context that is

Re: How to get all logging in the case of an error ?

2006-12-19 Thread James Stauffer
AFAIK, SMTPAppender supports that. What happened when you tried it? On 12/19/06, Matthias Petersen [EMAIL PROTECTED] wrote: Hi, I have the following configuration: ConsoleAppender for INFO and ERROR SMTP-Appender for ERROR The problem is that I want to send a mail with the SMTP-Appender with

Re: Adding new tags to log4j XML configuration file

2006-12-19 Thread Takacs Bence
Hello I made a logserver too, and looking for a solution for merging my configurations and the standard log4j configuration for the logserver. So I'd like to modify the log4j config schema or dtd too. What did you find out about it? Thanks: Bence Mattias Andersson wrote: Hi, I'm

Messaging Mapping?

2006-12-19 Thread Martinez, Roque
All; I have been doing some research and I keep coming across a thread in this mailing list which describes how to map messages to a specific text. I notice the implementation requires a number of constructions each time a log message is being created. I am wondering if anyone has been able to

RE: Messaging Mapping?

2006-12-19 Thread Kamal Ahmed
Rocky, Try using Resource Bundles and messages.properties The mapping is done in messages.properties file Here is a sample: G8dEvent.NullSourceType='source type id' must not be null WmTimedFileAppenderBase.NullDatePattern=DatePattern option is not set for appender {0}, using default: {1}

RE: Messaging Mapping?

2006-12-19 Thread Martinez, Roque
Kamal; Thanks for the quick response, but I am not sure how the logging code would look like. I know you are busy like all of us in this great industry, but could you be a little more elaborate in your explanation. Thanks Rocky -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

RE: JDBCAppender with large message values

2006-12-19 Thread Mike Miller
Thanks for the suggestion, and it appears to work in most cases. Now my problem is this: We have code on our client that sends logging calls to our server so that we can include 'client logged errors' in our server log. When we log an exception using log.error(throwable) this goes across to the

RE: Messaging Mapping?

2006-12-19 Thread Kamal Ahmed
Rocky, I will try... Your logging API would have to use Resource Bundles, and I am quite certain that Log4J does not use them. But I could be wrong Your test class public class WmJournalLogger189421Test extends TestCase { static final String BUNDLE_BASE_NAME =

Re: log4j conflict

2006-12-19 Thread Jacob Kjome
Log4j should not be in shared/lib. Put either in common/lib or WEB-INF/lib (or both, doesn't really matter), but not shared/lib. And unless you want to share a logger repository and/or use Log4j for Tomcat logging (in which case you would also put commons-logging.jar in common/lib), I would

Re: quesiton about LoggingEvent

2006-12-19 Thread Jacob Kjome
Did you compile with javac debug enabled? jake Quoting jin xin [EMAIL PROTECTED]: Hi: I use the following code Class testClass { public void test1() { --- Throwable throwable = null; Throwable child = new Throwable(test); LoggingEvent loggingEvent = new

RE: Messaging Mapping?

2006-12-19 Thread Martinez, Roque
Kamal; Because of your response I did more digging into the javadoc and found the following API l7dlog. It performs all the tasks you suggested! I want to thank you again for the time you spent on my question. Rocky -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On

log4j producing extraneous logging

2006-12-19 Thread kandryc
I am trying to use log4j in my application under Tomcat 5.5. However, it is producing mounds of debugging information but none of it lists the items I specify. Here is a portion of my application, the config file, and a portion of the output. Please note that logger.debug(TestServlet: Debugging)

Log4j prob with jboss

2006-12-19 Thread Parmar, Vijendra Singh
I played with log4j upto a great extent. My required output was supposed to be my own logging mechanism in which i should be able to create userlog.log name kind of different file and logs should generate in specific format(name#action#parameter) so that i can read the data easily. I am able to do

Re: log4j producing extraneous logging

2006-12-19 Thread Jacob Kjome
1. Don't configure from the servlet. Either let Log4j autoconfigure itself by finding log4j.properties or log4j.xml in the classpath or configure from a class that's guaranteed to be called once (or has methods that are guaranteed to be called once) such as a servlet context listener. 2.

FW: How to get all logging in the case of an error ?

2006-12-19 Thread Blok, Eelke
From: Blok, Eelke [mailto:[EMAIL PROTECTED] I would suggest to write your own appender that extends SMTPAppender and implements the desired logic of gathering related log messages, and sends them out when an error is received. Having no experience with SMTPAppender, I assumed the TS had