Added debug to the App server and here's what it found:
[#|2005-10-20T18:02:59.734+0100|INFO|sun-appserver-pe8.1_01|javax.enterp
rise.system.stream.out|_ThreadID=12;|log4j: Trying to find [log4j.xml]
using context classloader WebappCla
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.enterp
rise.system.stream.out|_ThreadID=12;|
log4j: Trying to find [log4j.xml] using [EMAIL PROTECTED]
class loader.|#]
[#|2005-10-20T18:02:59.937+0100|INFO|sun-appserver-pe8.1_01|javax.enterp
rise.system.stream.out|_ThreadID=12;|
log4j: Trying to find [log4j.xml] using
ClassLoader.getSystemResource().|#]
[#|2005-10-20T18:02:59.937+0100|INFO|sun-appserver-pe8.1_01|javax.enterp
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.enterp
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.enterp
rise.system.stream.out|_ThreadID=12;|
log4j: Reading configuration from URL
jar:file:/C:/Sun/AppServer/domains/domain1/lib/jaxr-ebxml.jar!/log4j.pro
perties|#]
So why does it not find the log4j.properties file in /WEB-INF/classes/??
Cheers
Rakesh
-----Original Message-----
From: James Stauffer [mailto:[EMAIL PROTECTED]
Sent: 20 October 2005 17:13
To: Log4J Users List
Subject: Re: Log4j not working
Add -Dlog4j.debug to the command line. That should help a lot. My
first guess is that either the log4j.jar and/or the log4j.properties
isn't in the correct location. I assume you are using automatic
configuration.
On 10/20/05, Rakesh Patel <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Have decided to go back to first principles after a rather painful 1.3
> phase.
>
> First step is to replace 1.3 with 1.2.9. Done.
> Second, create a new property file - copied one from the manual (and
> moved to classpath):
>
> log4j.rootLogger=debug, stdout, R
>
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
>
> # Pattern to output the caller's file name and line number.
> log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
>
> log4j.appender.R=org.apache.log4j.RollingFileAppender
> log4j.appender.R.File=example.log
>
> log4j.appender.R.MaxFileSize=100KB
> # Keep one backup file
> log4j.appender.R.MaxBackupIndex=1
>
> log4j.appender.R.layout=org.apache.log4j.PatternLayout
> log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
>
> Didn't change my code because compiled ok, here's an example:
>
> final static Logger logger =
> Logger.getLogger(LogonPageController.class);
> ...
> logger.debug("Entering method
> LogonPageController.handleRequestInternal");
> ...
>
> Deploy my app (as a directory using Sun App Server 8.1).
>
> And....nothing. No errors and no logging. No sign of example.log
> anywhere and no console output anywhere, even the server log.
>
> What am I doing wrong?
>
> Thanks
>
> Rakesh
>
>
> 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.
>
>
>
--
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]