You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Srilatha Alase <sa...@issintl.com> on 2006/01/31 21:47:19 UTC

RE:Commons-logging WSAD5.1

Hi,
  I have a problem with DEBUG messages being printed in the SystemOut.log file.

we have migrated from WSAD version 4 to WSAD 5.1 and we are encountering that commons-logging does not consider
the level assigned in the log4j.properties.It seems that It is reading the log4j.properties that I provided
since i kept a pattern to print and it prints in the pattern specified but somehow ignores the priority.

Even the code written to use the commons-logging is not pretty too..
the java classes which are getting logfactory and using that log instance are not having any problems.
We have a common utility class called Debug.java and the referring classes for example: MyTestDAO.java 
are invoking the methods on the Debug.java to do the logging are ignoring the log4j.properties priorities.

Attached is the Debug.java, and the MyTestDAO.java and log4j.properties


Environment:-WSAD 5.1(WebSphere Studio Application Developer) WAS (WebSphere Application Server) 5.1

jar file :- commons-logging-1.0.4.jar
we have commons-logging.properties with the following entry :-
org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.Log4jFactory


any help would be appreciated,
Thanks,
 <<log4j.properties.txt>>  <<Debug.java.txt>>  <<MyTestDAO.java.txt>> 


Re: RE:Commons-logging WSAD5.1

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
On Tue, 2006-01-31 at 14:47 -0600, Srilatha Alase wrote:
> Hi,
>   I have a problem with DEBUG messages being printed in the SystemOut.log file.
> 
> we have migrated from WSAD version 4 to WSAD 5.1 and we are encountering that commons-logging does not consider
> the level assigned in the log4j.properties.It seems that It is reading the log4j.properties that I provided
> since i kept a pattern to print and it prints in the pattern specified but somehow ignores the priority.

commons-logging (JCL) is a bridge: all it does it work out which logging
system it should bridging to and then delegate all logging to the
logging system. with a bridge there are two factors to consider. the
first is a misconfiguration of the bridge, the other is a
misconfiguration of the logging system bridged to.

the easiest way to test whether JCL is logging to the logging system you
want is to check whether the output is logging to the right place and is
formatted in the expected way. if so, then the problem lies in the
configuration of the logging system (log4j, in this case). if the output
is misplaced or appears in an unusual format then it's likely that JCL
has failed to understand which logging system it should be bridging to.

> we have commons-logging.properties with the following entry :-
> org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.Log4jFactory

that's deprecated. the following is now preferred: 

org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4jLogger

- robert


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


Re: Commons-logging WSAD5.1

Posted by Catalin Grigoroscuta <c....@moodmedia.ro>.
Hi,

See http://www-1.ibm.com/support/docview.wss?uid=swg27004610 for 
detailed information on websphere and JCL.

David J. M. Karlsen wrote:
> Srilatha Alase wrote:
>> Attached is the Debug.java, and the MyTestDAO.java and log4j.properties
>>
>>
>> Environment:-WSAD 5.1(WebSphere Studio Application Developer) WAS 
>> (WebSphere Application Server) 5.1
>>   
> WAS 5.x contains commons logging (which is already in a configured 
> state when your appserver is started and your app is starting). Try to 
> change the classloading mechanism for the enterprise application to 
> "parent last" - as stated in the JCL FAQ.
>
> Regs
>
> David
>


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


Re: Commons-logging WSAD5.1

Posted by "David J. M. Karlsen" <da...@davidkarlsen.com>.
Srilatha Alase wrote:
> Attached is the Debug.java, and the MyTestDAO.java and log4j.properties
>
>
> Environment:-WSAD 5.1(WebSphere Studio Application Developer) WAS (WebSphere Application Server) 5.1
>   
WAS 5.x contains commons logging (which is already in a configured state 
when your appserver is started and your app is starting). Try to change 
the classloading mechanism for the enterprise application to "parent 
last" - as stated in the JCL FAQ.

Regs

David

-- 
David J. M. Karlsen - +47 90 68 22 43
http://www.davidkarlsen.com
http://mp3.davidkarlsen.com



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