org/apache/log4j/Category problem

2003-08-27 Thread Rishikesh Tembe
Hi all, I have a servlet running in Tomcat, which I have setup to do logging via log4j. However, I get the foll. error when I try to run my app: java.lang.NoClassDefFoundError: org/apache/log4j/Category I have the jog4j-1.2.8.jar file in my classpath. I have also done:

Re: org/apache/log4j/Category problem

2003-08-27 Thread Paul Smith
On Wed, 2003-08-27 at 11:48, Rishikesh Tembe wrote: Hi all, I have a servlet running in Tomcat, which I have setup to do logging via log4j. However, I get the foll. error when I try to run my app: java.lang.NoClassDefFoundError: org/apache/log4j/Category I have the jog4j-1.2.8.jar file

Re: org/apache/log4j/Category problem

2003-08-27 Thread Jacob Kjome
Hi Rishi, Notice that you didn't get a ClassNotFoundException, but a NoClassDefFoundError. They are very different. The former means that it couldn't be found on the classpath where the latter means that at least one was found, but not the version it expected. This is usually caused by

Help!!!!!!!!

2003-08-27 Thread Raveendranath, Rohith (LNG - AUS)
Hi all, I am using Lo4j 1.2.8, During the cource of my application running i deleted the log file. Now there is no exception/error thrown. The application keeps on running ,possibly ignoring the logging part. Whys is this behaviour happening, Thanks and regards Rohith This e-mail is for

NDC's and thread with the same name.

2003-08-27 Thread Preetham Kajekar
Hi, I am using log4j1.28. I push an NDC onto the stack for every client call. However, I do not pop the stack when the call returns (this is because there are too many methods which need to be changed to pop this). The names of the client threads are reused. So would the NDCs of two threads

Single Logger, multiple threads

2003-08-27 Thread tom tumb
Hi all, We have an application that will be running a large number of theads (possibly 50) and currently we are using only a single Logger object across all these threads. I am wondering if this will lead to some performance issues (i.e. a thread waiting while another thread uses the logger)

Log file location

2003-08-27 Thread sriram
Hi, I am unable to set log file location. I searched the forum for old messages and found some. I tried the way it was mentioned in those messages, but still my problem is not solved. My log4j.properties file is as follows: log4j.rootCategory=WARN, dest1, R

RE: Log file location

2003-08-27 Thread Shapira, Yoav
Howdy, Look in the JBoss log for errors initializing log4j. Turn -Dlog4j.debug=true to see log4j internal debugging output. Try different paths for your File argument, e.g. d:\jboss\errors.log or d://jboss/errors.log. Yoav Shapira Millennium ChemInformatics -Original Message- From:

Re: Single Logger, multiple threads

2003-08-27 Thread Ceki Gülcü
Tom, We have addressed this concurrency problem in log4j version 1.3. Depending on how you name your loggers, you might have a small gain. Regardless how much we optimize log4j, calling it thousands, millions or even billions of times will have a computational cost. My advice to you would be to

Re: NullPointerException

2003-08-27 Thread Jeff_Mychasiw
Thanks for the reply , I will try to clarify. Though we are throwing are own exception that should be picked up by our Struts Exception handler, it seems that the problem is within Jboss or our config. Still working through the problem but, I was wondering if any other log4j user has seen

RE: Log file location

2003-08-27 Thread sriram
I look at JBoss log - no errors reported there. I used log4j.debug=true in log4j.properties, but there is no internal debugging output. I tried various combinations of filename, but none of them worked. If I specify as follows: log4j.appender.R.File=errors.log Where will the log file be created?

RE: Log file location

2003-08-27 Thread Shapira, Yoav
Howdy, I used log4j.debug=true in log4j.properties, but there is no internal debugging output. It's -Dlog4j.debug=true as a system property, as documented in the log4j manual. If I specify as follows: log4j.appender.R.File=errors.log It will get created in the server's working directory I

RE: Log file location

2003-08-27 Thread Ceki Gülcü
Given your observation, it is safe to say that your log4j.properties file is not being read. At 07:22 PM 8/27/2003 +0530, sriram wrote: I look at JBoss log - no errors reported there. I used log4j.debug=true in log4j.properties, but there is no internal debugging output. I tried various

Picking up log4j.properties

2003-08-27 Thread sriram
I'm using the following in my .java file: static Category cat = Category.getInstance(MyClass.class.getName()); In order to write logs to a file, should I modify the above line; and if yes, can you pl. tell me how I need to modify it? TIA Sriram

Bug#22055: Cannot catch PropertyConfigurator's IOException

2003-08-27 Thread Desai, Chetan P [ITS]
I had posted the following bug but don't know if its truly a bug... Sorry was not part of this mailing list earlier - so don't have any of the replies to my post. public static void main(String[] args) { Logger lg = Logger.getLogger(TestLog.class); try{

RE: Picking up log4j.properties

2003-08-27 Thread Shapira, Yoav
Howdy, static Category cat = Category.getInstance(MyClass.class.getName()); In order to write logs to a file, should I modify the above line; and if yes, can you pl. tell me how I need to modify it? I would suggest modifying it as private static final Logger logger =

RE: Location of log files

2003-08-27 Thread Larry Young
Hello, This is a question about a post from several weeks ago. I wasn't ready to try it at the time, but I saved it because I knew I'd need it later on ... :) When I tried to use filtering as described in the original post (actually, I created a filterset inside the copy

RE: Log file location

2003-08-27 Thread sriram
The problem is log4j.properties file not being located...the log output on the console is being generated based on default properties of log4j (I assume). So I am not looking at how to make log4j.properties file visible to the application. I placed it in WEB-INF/classes, but there is no use.

Re: Bug#22055: Cannot catch PropertyConfigurator's IOException

2003-08-27 Thread Ceki Gülcü
This is a known weakness of the existing log4j configurators which I intend to fix in log4j 1.3. At 10:35 AM 8/27/2003 -0500, Desai, Chetan P [ITS] wrote: I had posted the following bug but don't know if its truly a bug... Sorry was not part of this mailing list earlier - so don't have any of

RE: Log file location

2003-08-27 Thread Ceki Gülcü
Sriram, JBoss already includes log4j. Are you including log4j.jar in WEB-INF/lib? I think jboss is ignoring your log4j.jar in WEB-INF/lib because log4j classes are already loaded and available. Thus, since your log4j.jar is not being loaded into memory, the static initializer of LogManager

RE: Location of log files

2003-08-27 Thread Shapira, Yoav
Howsdy, Try filter token=token value=value / outside a filterset. (i.e. no filterset at all, just the above line above the copy task. Yoav Shapira Millennium ChemInformatics -Original Message- From: Larry Young [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 27, 2003 11:36 AM To:

Re: Single Logger, multiple threads

2003-08-27 Thread tom ONeill
Hi Ceki, Thanks for your reply. In what way has this concurrency issue been addressed in version 1.3. Rather than use one logger we might use one in each thread that will inherit from a base logger. How would this affect the logging performance. Im still not too clear on the whole issue. :(

Generic logger for Webapps

2003-08-27 Thread Digambar, Shaligram (Consultant)
Is there a generic way for existing web applications to send the logs to a file so that the logs can be sorted (using tools such as logfactor) based on client/session ID? The web app uses JSP-Struts-Action Servlets-EJBs-Database. I know there are NDC/MDC but they need push/pop calls in each and

Re: org/apache/log4j/Category problem

2003-08-27 Thread Rishikesh Tembe
Hi Thanks Phil and Jacob for your input. The problem was due to the existence of multiple versions of the jog4j.jar file. After I cleaned everything up, put the jar in WEB-INF/lib and the props file in WEB-INF/classes, everything worked! Has the format of the XML/props file been specfied

RE: Location of log files

2003-08-27 Thread Larry Young
Yoav, Thanks for the suggestion, but that doesn't work either. So now I have: property name=installdir value=${env.CATALINA_HOME}/webapps/MYAPP/ target ... filter token=INSTALLDIR value=${installdir/WEB_INF/

Re: Generic logger for Webapps

2003-08-27 Thread Larry Young
Shaligram, If you are using Tomcat, someone posted a Filter solution a few days ago for this particular situation. If you can't do it that way, I would think you could easily subclass the Struts ActionServlet class and simply add/remove the MDC value before/after calling the

RE: Location of log files

2003-08-27 Thread Shapira, Yoav
Howdy, Ant can handle either way, forward or back, as long as it's consistent. The problem arises when a single string uses mixed slashes. Ant's FixCRLF task works in this area and might be useful here. Yoav Shapira Millennium ChemInformatics -Original Message- From: Larry Young

RE: Generic logger for Webapps

2003-08-27 Thread Digambar, Shaligram (Consultant)
Larry, The ActionServlet subclassing solution sounds like a nice way to handle this. Thanks for your input. If anyone has better ideas or they have already implemented this solution please let me know. Thanks, Shaligram Phone: (401)392-7948 Fax:(401)392-4974/4975 -Original Message-

duplicate logging?

2003-08-27 Thread Rishikesh Tembe
Hi all, If in my code I have logger.info(AIN: Received 'ReadEvent' from Thread1 ); why do I get the following in my log file? snip AIN: Received 'ReadEvent' from Thread1 2003-08-27 11:29:08,463 [1] : AIN: Received 'ReadEvent' from Thread1 /snip I am using PatternLayout with the pattern as %d

RE: duplicate logging?

2003-08-27 Thread Shapira, Yoav
Howdy, How are you configuring log4j? Yoav Shapira Millennium ChemInformatics -Original Message- From: Rishikesh Tembe [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 27, 2003 2:43 PM To: Log4J Users List Subject: duplicate logging? Hi all, If in my code I have logger.info(AIN:

RE: Location of log files

2003-08-27 Thread Larry Young
Yaov, Agg why didn't I check the book before posting that!! On page 101 of Ceki's book, the File option has a full description associated with it, including the note about having to escape the '\' on the windoze platform, and also about being able to simply use the '/'

Config in app server envs

2003-08-27 Thread Ebersole, Steven
Whats the standard way to setup logging in an app server when some components use a properties file for config and some use an xml file? Previously we had control of all deployed components on thats server, and all the components used a file named log4j-config.xml located on the various

RE: duplicate logging?

2003-08-27 Thread Rishikesh Tembe
The code is in a servlet running in Tomcat. I have WEB-INF/classes/log4j.properties (shown below) WEB-INF/lib/log4j-1.2.8.jar which AFAIK should allow automatic configuration, shouldn't it?. -Rishi. --- Shapira, Yoav [EMAIL PROTECTED] wrote: Howdy, How are you configuring log4j? Yoav

RE: Config in app server envs

2003-08-27 Thread Charles Hudak
There are obviously many ways to do this. The way I do it is I created a LogInitializer servlet that is loaded on startup and uses a single configuration file. Since I'm really only concerned about the logging from MY code and not any of the open source/other components that I have installed,

RE: Location of log files

2003-08-27 Thread Shapira, Yoav
Howdy, Cool, thanks for posting your final solution! ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: Larry Young [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 27, 2003 3:56 PM To: Log4J Users List Subject: RE: Location of log files Yaov, Agg

RE: duplicate logging?

2003-08-27 Thread Rishikesh Tembe
Is this how its done? log4j.rootLogger.additivity=false I tried this, but I still get the same result! -Rishi. --- Shapira, Yoav [EMAIL PROTECTED] wrote: Howdy, It should. Set additivity=false for the root logger and see what happens. Yoav Shapira Millennium ChemInformatics =

Re: Log file location

2003-08-27 Thread Ceki Gülcü
Is the properties file being read at all? At 06:25 PM 8/27/2003 +0530, sriram wrote: Hi, I am unable to set log file location. I searched the forum for old messages and found some. I tried the way it was mentioned in those messages, but still my problem is not solved. My log4j.properties file

Re: org/apache/log4j/Category problem

2003-08-27 Thread Paul Smith
On Thu, 2003-08-28 at 03:43, Rishikesh Tembe wrote: Hi Thanks Phil and Jacob for your input. The problem was due to the existence of multiple versions of the jog4j.jar file. After I cleaned everything up, put the jar in WEB-INF/lib and the props file in WEB-INF/classes, everything

RE: duplicate logging?

2003-08-27 Thread Paul Smith
On Thu, 2003-08-28 at 06:32, Rishikesh Tembe wrote: Is this how its done? log4j.rootLogger.additivity=false Close, but no cigar. The Log Event starts getting logged at it's own Logger (say, the com.mycompony.mycomponent Logger, and gets logged up the hierarchy until it reaches the root

RE: Config in app server envs

2003-08-27 Thread Sullivan, Sean C - MWT
Our situation: - Log4j 1.2.8 - two application servers in our cluster - five EAR's We use a single log4j.xml for all of our applications. log4j.xml is stored on the server's filesystem. We set JVM system property (log4j.configuration) so that Log4j can find our log4j.xml file -Sean

RE: Config in app server envs

2003-08-27 Thread Ebersole, Steven
That is pretty much what we are trying. It was working up until installing this new component. Unfortunately, this new component uses what appears to be a custom logger wrapper which, no matter what we try, just does not utilize the existing current log4j init. -Original Message- From:

RE: Config in app server envs

2003-08-27 Thread Sullivan, Sean C - MWT
We had a similar problem. Our applications use NCR's Teradata JDBC type 4 driver. When the driver loads, it configures Log4j with an NCR-provided configuration. The driver would wipe out our configuration and disable Log4j's root logger. I had to implement a workaround. The workaround is

config file reloading

2003-08-27 Thread Larry Young
Hello, I was planning on using the FileWatchdog class (via DOMConfigurator) to cause my log4j.xml file to be reloaded whenever it is changed, avoiding having to bounce the webapp during debug. My problem is that I rely on the default initialization mechanism in log4j to find the