logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paolo Scopa <paolosc...@yahoo.com>
Subject Re: Log problem with Tomcat 5 (lots of logs)
Date Thu, 20 Sep 2007 07:34:46 GMT

Sorry for the confusion.
At the beginning i put the new common-loggings-api-1.1.jar in the bin
folder.
Then i realized that there was already a common-loggings-api.jar (without
"-1.1" in the filename), so i removed the new one that i put there before.
Now in the bin folder there is only the original common-loggings.jar in the
bin folder.

In the web-inf/lib folder there are two files now:
commons-logging-1.1.jar and log4j-1.2.15.jar.

I checked and there is no other copy of commons-logging, commons-logging-api
or log4j of any version around.
The only log4j.xml file is the one in my web-inf/classes folder, with the
related log4j.dtd
There are no log4j.properties around.

Problem still there, but, as i said, now it is only limited to hivemind
Paolo



Jacob Kjome wrote:
> 
> On Wed, 19 Sep 2007 08:12:28 -0700 (PDT)
>   Paolo Scopa <paoloscopa@yahoo.com> wrote:
>> 
>> As you see from the other post, problem is still there :(
>> I removed the common-loggings-api-1.1.jar from bin directory (yes, a
>> common-loggings-api.jar was already there and is still there).
> 
> Your responses are quite confusing.  You say you removed it from the bin 
> directory AND it is still there.  Which is it???  Can you also confirm
> that 
> you downloaded version 1.1 of commons-logging and added  
> (not commons-logging-api.jar) to WEB-INF/lib alongside log4j.jar?
> 
> Jake
> 
>> Nothing changed, sob
>> 
>> Paolo
>> 
>> 
>> Jacob Kjome wrote:
>>> 
>>> On Wed, 19 Sep 2007 06:53:59 -0700 (PDT)
>>>   Paolo Scopa <paoloscopa@yahoo.com> wrote:
>>>> 
>>>> You are right,
>>>> common loggings came with tapestry.
>>>> I removed it from the shared/lib directory and copied version 1.1 in
>>>> web-inf/lib.
>>>> Copied in the tomcat bin folder the common-loggings-api.jar.
>>>> 
>>> 
>>> Not sure I understand that last statement?  You should leave alone the 
>>> commons-logging-api.jar in tomcat/bin and don't use
>>> commons-logging-api.jar 
>>> for WEB-INF/lib, but version 1.1 of the commons-logging.jar (without the 
>>> "-api" suffix).  Just want to make sure you understand that.
>>> 
>>>> Also i set the root logger level to warning and or.my logger to debug
>>>> (i
>>>> did
>>>> it before with no effects)
>>>> 
>>>> WOAW
>>>> it looks it works!!!
>>>> Iam not sure why, but it does.
>>>> Thanks a lot.
>>>> Paolo
>>>> 
>>>> (will let you know if it comes back ... :) )
>>>> 
>>> 
>>> Glad to hear you acheived the results you were hoping for!  I just hope
>>> it's 
>>> for the right reasons.  If your approach matches my clarification above,
>>> then 
>>> all is well :-)
>>> 
>>> 
>>> Jake
>>> 
>>>> 
>>>> 
>>>> Jacob Kjome wrote:
>>>>> 
>>>>> On Tue, 18 Sep 2007 07:43:30 -0700 (PDT)
>>>>>   Paolo Scopa <paoloscopa@yahoo.com> wrote:
>>>>>> 
>>>>>>Forgotten: thanks a lot for the support.
>>>>>> Agree, additivity does not change much. The funny thing is that i
get
>>>>>> all
>>>>>> the logs anyway.
>>>>>> The file got messed in the paste: heve to add XX to param to paste
it
>>>>>> here
>>>>>> for some reason. It was:
>>>>>> 		<XXparam name="File" value="PROD.log"/>
>>>>>> 		<XXparam name="DatePattern" value="'.'yyyy-MM-dd"/>
>>>>>> 		<XXparam name="Append" value="false"/>
>>>>>> 
>>>>>> The file is created and filled up with all the mess i see on console.
>>>>>> sasme
>>>>>> behaviour.
>>>>>> This is the main thing i dont understand: if it was the console only
>>>>>> i
>>>>>> would
>>>>>> presume messages comes from some other logging library, as you
>>>>>> suggest.
>>>>>> But
>>>>>> why should that library write into my file, and change name according
>>>>>> with
>>>>>> my log4j settings?
>>>>>> 
>>>>>> I am not sure what iu should do with commons-logging.
>>>>>> at the moment there is commons-logging-api.jar in tomcat/bin and
a
>>>>>> commons-logging-1.0.3.jar in tomcat/shared/lib. Does this have
>>>>>> anything
>>>>>> to
>>>>>> do? I think tomcat came like this, i dont remember changing it.
>>>>> 
>>>>> Well, you must have because Tomcat doesn't ship with anything in
>>>>> shared/lib. 
>>>>>  BTW, I would replace that with commons-logging-1.1.jar.  Many
>>>>> classloading 
>>>>> bugs have been fixed in the latest version of commons-logging.
>>>>> 
>>>>>> Should i put another copy of it in my web-inf/lib directory?
>>>>> 
>>>>> Absolutely, yes.  Anywhere log4j.jar goes, put a copy of 
>>>>> commons-logging-1.1.jar.  Same goes for SLF4J, if it is required by
>>>>> any 
>>>>> libraries.  Let us know if that changes anything.
>>>>> 
>>>>> Jake
>>>>> 
>>>>>> thanks again
>>>>>> Paolo
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> Based on this configuration, by setting additivity="false", you
>>>>>> effectively 
>>>>>> have no appenders attached to the loggers you've specified.  Even
if
>>>>>> the
>>>>>> level 
>>>>>> is "debug", you should get no output for the following loggers and
>>>>>> their 
>>>>>> children....
>>>>>> 
>>>>>> org.my
>>>>>> org.apache
>>>>>> org.hibernate
>>>>>> 
>>>>>> additivity="false" cuts off the inheritance tree.  It can be useful,
>>>>>> but
>>>>>> not 
>>>>>> the way you are using it.  You should remove additivity="true" is
the
>>>>>> default, 
>>>>>> so you can exclude the additivity attribute altogether to get the
>>>>>> appropriate 
>>>>>> behavior for you needs.  Of course this brings us back to the
>>>>>> original
>>>>>> problem 
>>>>>> where you aren't seeing the logging behavior you expect to see. 
Read
>>>>>> on....
>>>>>> 
>>>>>> You never answered my question on commons-logging or SLF4J. 
>>>>>> Many/Most 
>>>>>> frameworks out there choose not to depend on a particular
>>>>>> implementation, 
>>>>>> choosing instread to depend on a more lightweight logger abstraction,
>>>>>> such
>>>>>> as 
>>>>>> the two mentioned.  Both define how they interact with Log4j.  For
>>>>>> SLF4J, 
>>>>>> you'd have to put the slf4j-api.jar and slf4j-log4j.jar in the
>>>>>> classpath
>>>>>> to 
>>>>>> utilize log4j.  For commons-logging, having commons-logging-api.jar
>>>>>> means
>>>>>> you 
>>>>>> will end up using JDK 1.4 logging.  The API jar has no Log4j
>>>>>> implementation. 
>>>>>> What you would need is commons-logging.jar (without "-api" on the
>>>>>> name).
>>>>>> 
>>>>>> BTW, for your "rolling" appender, it still doesn't appear that you
>>>>>> define
>>>>>> a 
>>>>>>File for it unless you purposefully excluded it or it got messed up
when 
>>>>>> pasting it in to the email.  Is the file getting created?  At least
>>>>>> the
>>>>>> file 
>>>>>> should be created even if there is no output.  Does it get any
>>>>>> output? 
>>>>>> Maybe 
>>>>>> remove the console appender from the config and only use a simple
>>>>>>FileAppender 
>>>>>> instead of a rolling file appender.  Once that works, you can add
>>>>>> back 
>>>>>> complexity.
>>>>>> 
>>>>>> BTW, what I usually do is set the <root> to <level value="warn"/>.

>>>>>> Then
>>>>>> I 
>>>>>> define certain loggers to increase output as I need it.  It's much
>>>>>> easier
>>>>>> to 
>>>>>> do this than set the <root> at some lower level and then have
to
>>>>>> define 
>>>>>> multiple loggers that I don't care about just to get them to shut
up.
>>>>>> 
>>>>>> Anyway, keep trying.  We'll track down the issue at some point here.
>>>>>> 
>>>>>> 
>>>>>> Jake
>>>>>> 
>>>>>> -- 
>>>>>> View this message in context: 
>>>>>>http://www.nabble.com/Log-problem-with-Tomcat-5-%28lots-of-logs%29-tf4465225.html#a12758605
>>>>>> Sent from the Log4j - Users mailing list archive at Nabble.com.
>>>>>> 
>>>>>> 
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>>>>>For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>>>> 
>>>>>> 
>>>>> 
>>>>> 
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>>> 
>>>>> 
>>>>> 
>>>> 
>>>> -- 
>>>> View this message in context: 
>>>>http://www.nabble.com/Log-problem-with-Tomcat-5-%28lots-of-logs%29-tf4465225.html#a12777963
>>>> Sent from the Log4j - Users mailing list archive at Nabble.com.
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>>>For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>> 
>>>> 
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>> 
>>> 
>>> 
>> 
>> -- 
>> View this message in context: 
>>http://www.nabble.com/Log-problem-with-Tomcat-5-%28lots-of-logs%29-tf4465225.html#a12779536
>> Sent from the Log4j - Users mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>For additional commands, e-mail: log4j-user-help@logging.apache.org
>> 
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Log-problem-with-Tomcat-5-%28lots-of-logs%29-tf4465225.html#a12792214
Sent from the Log4j - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message