Hi guys, 

Here's an update as I've been playing around with it for a while....

Have moved to xml file configuration and now it gets picked up and used
from WEB-INF/classes. The log4j.jar in the application server is quite
old (I tried to use it for compilation but it failed. I think its that
category/logger change in recent releases it doesn't have).

The only real annoyance right now is that the log statements seem to be
concatenated with the app server ones:

[#|2005-10-21T15:46:47.250+0100|INFO|sun-appserver-pe8.1_01|javax.enterp
rise.system.stream.out|_ThreadID=14;|2005-10-21 15:46:47,250 [Thread-81]
DEBUG com.acme.ifst.service.QueueServiceImpl - Exiting method Queue
ServiceImpl.checkDbForCompletedQueriesTask
|#]

Anyone know how to stop the first part
([#|2005-10-21T15:46:47.250+0100|INFO|sun-appserver-pe8.1_01|javax.enter
prise.system.stream.out|_ThreadID=14;|#]) from appearing???

Here's my current config file:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/";>

    <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern"
                value="%d [%t] %-5p %c - %m%n"/>
        </layout>
    </appender>
    
    <logger name="org.springframework">
        <level value="WARN"/>
    </logger>
    
        <logger name="com.amex.ifst">
        <level value="DEBUG"/>
    </logger>

    <root>
        <level value="ERROR"/>
        <appender-ref ref="CONSOLE"/>
    </root>

</log4j:configuration>

Cheers

Rakesh

-----Original Message-----
From: James Stauffer [mailto:[EMAIL PROTECTED] 
Sent: 21 October 2005 14:31
To: Log4J Users List
Subject: Re: Log4j not working


If both your app server and application use log4j with different configs
I am not sure how to set it up.  If you want to use the same config file
for both then move the config and jar to one common place (on Tomcat
that is common/classes/log4j.properties and common/lib/log4j.jar).  What
happens if you remove C:\Sun\AppServer\domains\domain1\lib\log4j.jar. ?

On 10/21/05, Rakesh Patel <[EMAIL PROTECTED]> wrote:
> Bizarre...I started the thread "Log4j not working" but Damodar(or
> dyemme) seems to have answered for me but he's using Tomcat.
>
> So James, in answer to your question to me, log4j is in 
> C:\Projects\PBTV\war\WEB-INF\lib\log4j-1.2.9.jar along with my 
> app-specific jars. There is also one in the app server, 
> C:\Sun\AppServer\domains\domain1\lib\log4j.jar.
>
> Obviously I want to pick up the one in WEB-INF\lib first and use that.
>
> Still don't understand why log4j didn't pick up the log4j.properties 
> file in Web-INF\classes even though it says it went to look there.....
>
> Rakesh
>
> -----Original Message-----
> From: James Stauffer [mailto:[EMAIL PROTECTED]
> Sent: 20 October 2005 19:54
> To: Log4J Users List
> Subject: Re: Log4j not working
>
>
> Where is your log4j.jar?
>
> On 10/20/05, Rakesh Patel <[EMAIL PROTECTED]> wrote:
> > Added debug to the App server and here's what it found:
> >
> > log4j: Trying to find [log4j.xml] using 
> > ClassLoader.getSystemResource().|#]
> >
> > [#|2005-10-20T18:02:59.937+0100|INFO|sun-appserver-pe8.1_01|javax.en
> > te
> > rp
> > rise.system.stream.out|_ThreadID=12;|
> > log4j: Trying to find [log4j.properties] using context classloader
> > WebappClassLoader
> >   delegate: true
> >   repositories:
> >     /WEB-INF/classes/
> > ----------> Parent Classloader:
> > EJBClassLoader :
> > urlSet = []
> > doneCalled = false
> >  Parent -> [EMAIL PROTECTED]
> >
> > .|#]
> >
> > [#|2005-10-20T18:02:59.937+0100|INFO|sun-appserver-pe8.1_01|javax.en
> > te
> > rp
> > rise.system.stream.out|_ThreadID=12;|
> > log4j: Using URL
> >
> [jar:file:/C:/Sun/AppServer/domains/domain1/lib/jaxr-ebxml.jar!/log4j.
> pr
> > operties] for automatic log4j configuration.|#]
> >
> > [#|2005-10-20T18:02:59.968+0100|INFO|sun-appserver-pe8.1_01|javax.en
> > te
> > rp
> > rise.system.stream.out|_ThreadID=12;|
> > log4j: Reading configuration from URL
> >
> jar:file:/C:/Sun/AppServer/domains/domain1/lib/jaxr-ebxml.jar!/log4j.p
> ro
> > perties|#]
> >
> > So why does it not find the log4j.properties file in 
> > /WEB-INF/classes/??
>
> --
> James Stauffer
> Are you good? Take the test at http://www.livingwaters.com/good/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> American Express Investments and American Express Independent 
> Financial Advisers are marketing names for American Express Financial 
> Services Europe Limited, a separate corporation within the American 
> Express group of companies.  American Express Financial Services 
> Europe Limited is authorised and regulated by, and is entered into the

> register (No. 190853 www.fsa.gov.uk/register/) of, the Financial 
> Services Authority and a member of the London Stock Exchange. 
> Registered in England No. 3614902. Registered address: 230 Blackfriars

> Road, London SE1 8NW. Vat No. 740 4143 68.
>
> The information in this email and any attachments is confidential and 
> intended solely for the attention and use of the named addressee(s). 
> It may be subject to legal, professional or other privilege and 
> further distribution of it is strictly prohibited without our 
> authority.  If you are not the intended recipient, you are not 
> authorised to and must not disclose, copy, distribute, or retain this 
> message or any part of it, and should notify us immediately.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



American Express Investments and American Express Independent Financial 
Advisers are marketing names for American Express Financial Services Europe 
Limited, a separate corporation within the American Express group of companies. 
 American Express Financial Services Europe Limited is authorised and regulated 
by, and is entered into the register (No. 190853 www.fsa.gov.uk/register/) of, 
the Financial Services Authority and a member of the London Stock Exchange. 
Registered in England No. 3614902. Registered address: 230 Blackfriars Road, 
London SE1 8NW. Vat No. 740 4143 68. 

The information in this email and any attachments is confidential and intended 
solely for the attention and use of the named addressee(s). It may be subject 
to legal, professional or other privilege and further distribution of it is 
strictly prohibited without our authority.  If you are not the intended 
recipient, you are not authorised to and must not disclose, copy, distribute, 
or retain this message or any part of it, and should notify us immediately.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to