Filip

At the beginning of this conversation you said that you would validate
my web app for me.

I have created a very simple web app that shows the difference in
behaviour in terms of where a RuntimeException is logged in Tomcat
5.5.23 and 6.0.14. It doesn't seem to matter whether or not Log4J is
turned on at the Tomcat level.

The web app consists of an "emtpy" web xml, 3 simple JSP pages,
the commons-logging and log4j Jars and a log4j.properties file.

Shall I send the War to [EMAIL PROTECTED] or do you have an
alternative place you would like it sent?

Regards

Ashley

-----Original Message-----
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: 22 August 2007 21:19
To: Tomcat Users List
Subject: Re: Logging Problem on Upgrade to Tomcat 6

Ashley Hollands wrote:
> There wasn't any trace at all - I added my own logging to tell me that 
> one server had sent the message, but on the other server there was no 
> sign of why it wasn't being delivered to the ChannelListener until I 
> turned on debug logging and then it reported the 
> ClassNotFoundException, but not at the SEVERE or WARNING level.
>
> Seeing as it is the first time I have used Tribes, it is possible that 
> I did something wrong - but I don't think so.
>   
you are right, debug has to be enabled, I'm gonna change that right away.
basically, if you have classes outside of the scope of Tribes classloader,
you are better off just sending a byte[] and do the
serialization/deserialization yourself.

Filip
> Ashley
>
> -----Original Message-----
> From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
> Sent: 22 August 2007 20:39
> To: Tomcat Users List
> Subject: Re: Logging Problem on Upgrade to Tomcat 6
>
> Ashley Hollands wrote:
>   
>> OK - I'll run through the steps from scratch again and see if I have 
>> more joy this time.
>>   
>>     
> let me know how it goes, I can help out more.
>   
>> By the way, I have been using Tribes in my application and it works 
>> really well. I did have a problem initially as I was sending a class 
>> that did not exist in Tomcat's classpath, only in the web application 
>> and there was no error logged anywhere to report the 
>> ClassNotFoundException
>> - can I suggest that this exception is logged somewhere to help 
>> people develop using Tribes?
>>   
>>     
> did you by any chance save the stacktrace or was there none? I thought 
> tribes was pretty good about not swallowing any errors. but I would 
> like to improve if there is possibility to do so
>
> Filip
>   
>> Thanks for all your help.
>>
>> Ashley
>>
>> -----Original Message-----
>> From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
>> Sent: 22 August 2007 20:21
>> To: Tomcat Users List
>> Subject: Re: Logging Problem on Upgrade to Tomcat 6
>>
>> Ashley Hollands wrote:
>>   
>>     
>>> What is confusing me is that I never had to catch the exception and 
>>> log it from within my application in Tomcat 4, 5 or 5.5 - it just 
>>> appeared in the web app log automatically.
>>>
>>> Is there no way to configure Log4J/Tomcat 6 to do the same thing 
>>> without having to do as you suggest?
>>>   
>>>     
>>>       
>> it should do it, if you removed tomcat's logging manager and replaced 
>> it with log4j so you might have just missed a step
>>
>> Filip
>>   
>>     
>>> Ashley
>>>
>>> -----Original Message-----
>>> From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
>>> Sent: 22 August 2007 19:51
>>> To: Tomcat Users List
>>> Subject: Re: Logging Problem on Upgrade to Tomcat 6
>>>
>>> it will only log to the webapp.log if your application catches the 
>>> exception, then issues a log.error("msg",exception) (tomcat will do 
>>> the same assuming it was correctly configured)
>>>
>>> if you provide a sample war, I can validate it for you
>>>
>>> Filip
>>>
>>> Ashley Hollands wrote:
>>>   
>>>     
>>>       
>>>> I did build the extra JAR files as described in the documentation.
>>>>
>>>> Whether I am using Log4J at the Tomcat level, or using Tomcat's 
>>>> default logging, I do get log messages in my web app log. For 
>>>> example if I add the following to my web app log4j.properties:
>>>>
>>>> log4j.logger.com.mycompany=INFO
>>>>
>>>> it logs these messages to the web app log no problem - both with 
>>>> Log4J and Tomcat's default logging at the top-level.
>>>>
>>>> My problem is that it isn't logging Exceptions even though as I 
>>>> understand it, it should be logging anything with priority ERROR or 
>>>> higher (lower?) that is generated by the web app to the web app log.
>>>>
>>>> Ashley
>>>>
>>>> -----Original Message-----
>>>> From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
>>>> Sent: 22 August 2007 19:12
>>>> To: Tomcat Users List
>>>> Subject: Re: Logging Problem on Upgrade to Tomcat 6
>>>>
>>>> Ashley Hollands wrote:
>>>>   
>>>>     
>>>>       
>>>>         
>>>>> Thanks for the reply Filip
>>>>>
>>>>>   
>>>>>     
>>>>>       
>>>>>         
>>>>>           
>>>>>> if you want a global log4j (instead of tomcat's own framework)...
>>>>>>     
>>>>>>       
>>>>>>         
>>>>>>           
>>>>>>             
>>>>> I have configured Tomcat to use Log4J at the top-level using the 
>>>>> documentation you recommend no problem, but it doesn't solve my 
>>>>> problem.
>>>>>
>>>>> What I want is for the Exception to get logged at the web 
>>>>> application level (I'm not bothered whether it also gets logged at 
>>>>> the Tomcat level or not - Using Tomcat 5.5, it used to get logged 
>>>>> at the web application level and not at the Tomcat level at all).
>>>>>   
>>>>>     
>>>>>       
>>>>>         
>>>>>           
>>>> you want it to go to webapp.log, as you configured below?
>>>> and you did build the additional JARs that Tomcat uses and removed 
>>>> the usage of Tomcat's own logging.
>>>> from your explanation, it doesn't sound like you took these steps, 
>>>> cause if you did, tomcat would log into your log4j, and not its own 
>>>> mechanism
>>>>
>>>> Filip
>>>>   
>>>>     
>>>>       
>>>>         
>>>>> Ashley
>>>>>
>>>>> -----Original Message-----
>>>>> From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
>>>>> Sent: 22 August 2007 18:03
>>>>> To: Tomcat Users List
>>>>> Subject: Re: Logging Problem on Upgrade to Tomcat 6
>>>>>
>>>>> if you want a global log4j (instead of tomcat's own framework) 
>>>>> http://tomcat.apache.org/tomcat-6.0-doc/logging.html
>>>>> then you will need to be tomcat-juli.jar and 
>>>>> tomcat-juli-adapters.jar as described in the docs,
>>>>>
>>>>> let me know if you need more clarification Filip
>>>>>
>>>>> Ashley Hollands wrote:
>>>>>   
>>>>>     
>>>>>       
>>>>>         
>>>>>           
>>>>>> Hi
>>>>>>
>>>>>> I have recently upgraded from Tomcat 5.5 to 6.0 and from Java 1.5 
>>>>>> to 6.
>>>>>>
>>>>>> I use Log4J for all my web application logging and have 
>>>>>> discovered that after the upgrade, any exceptions thrown in the 
>>>>>> web application are not logged to my web application log, but to 
>>>>>> the top-level Tomcat log.
>>>>>>
>>>>>> Does anybody know how I can make sure any java.lang.Exceptions 
>>>>>> thrown are logged to the web application log? It used to work 
>>>>>> fine with the previous versions of Tomcat (4, 5 and 5.5).
>>>>>>
>>>>>> My web application log4j.properties file is as follows if that helps:
>>>>>>
>>>>>> log4j.rootCategory=ERROR, logfile
>>>>>>
>>>>>> log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender
>>>>>> log4j.appender.logfile.DatePattern='.'yyyy-MM-dd
>>>>>> log4j.appender.logfile.File=/logs/tomcat/webapp.log
>>>>>> log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
>>>>>> log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> Ashley
>>>>>>
>>>>>>
>>>>>>
>>>>>> -----------------------------------------------------------------
>>>>>> -
>>>>>> -
>>>>>> -
>>>>>> - To start a new topic, e-mail: users@tomcat.apache.org To 
>>>>>> unsubscribe,
>>>>>> e-mail: [EMAIL PROTECTED]
>>>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>>>
>>>>>>
>>>>>>
>>>>>>   
>>>>>>     
>>>>>>       
>>>>>>         
>>>>>>           
>>>>>>             
>>>>> ------------------------------------------------------------------
>>>>> -
>>>>> -
>>>>> - To start a new topic, e-mail: users@tomcat.apache.org To 
>>>>> unsubscribe,
>>>>> e-mail: [EMAIL PROTECTED]
>>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------
>>>>> -
>>>>> -
>>>>> - To start a new topic, e-mail: users@tomcat.apache.org To 
>>>>> unsubscribe,
>>>>> e-mail: [EMAIL PROTECTED]
>>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>>
>>>>>
>>>>>
>>>>>   
>>>>>     
>>>>>       
>>>>>         
>>>>>           
>>>> -------------------------------------------------------------------
>>>> -
>>>> - To start a new topic, e-mail: users@tomcat.apache.org To 
>>>> unsubscribe,
>>>> e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>> -------------------------------------------------------------------
>>>> -
>>>> - To start a new topic, e-mail: users@tomcat.apache.org To 
>>>> unsubscribe,
>>>> e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>>
>>>>   
>>>>     
>>>>       
>>>>         
>>> --------------------------------------------------------------------
>>> - To start a new topic, e-mail: users@tomcat.apache.org To 
>>> unsubscribe,
>>> e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>> --------------------------------------------------------------------
>>> - To start a new topic, e-mail: users@tomcat.apache.org To 
>>> unsubscribe,
>>> e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>>   
>>>     
>>>       
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
>> e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
>> e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>   
>>     
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
> e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, 
> e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to