OK, first let me double check something.  You do
have more lines in the log4j.properties file
than that one, right?

Here's an example of one I use:

<code>
# Global log settings 
# everything not specified below reports at this level
# Use debug to generate massive info.
log4j.rootLogger=info, RollingFile

# Application log settings
# packages and subpackages of com.foobar.app at this level
log4j.logger.com.foobar.app=debug, RollingFile
# Torque diagnostics
log4j.logger.org.apache.torque=info, RollingFile

# Rolling log file settings 
# limits logs to four 2Mb files
log4j.appender.RollingFile=org.apache.log4j.RollingFileAppender
log4j.appender.RollingFile.File=${catalina.home}\\logs\\tomcat.log
log4j.appender.RollingFile.MaxFileSize=2000KB
log4j.appender.RollingFile.MaxBackupIndex=3
</code>

Note: The torque.ini settings don't seem to work (did
they ever?) Ignore them.

Also a lot of the newer torque classes now use the 
commons-logging API/Interface code.  You may need 
to "connect" log4j to it.  You do this with a
commons-logging.property file like:

<code>
#
# commons-logging config
#

org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.Lo
gFactoryImpl
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogg
er
</code>

Both these files need to be either in the root
directory of a java class directory or in the
root of a jar file on the classpath.

I'm not sure how you'd do that in WSAD.  In Eclipse,
just having it in the root of the source works,
because Eclipse's internal build will copy all
resources into the output folder (e.g. bin/classes).
But some build scripts don't do this.  E.g. in
Maven, you have to do some special stuff to get
this to happen.

Worst case is you may have to create a "logging.jar"
with just these files in them.  Then add it to your
build and/or runtime class path.


> Jim Caserta said:
> 
> I changed the log4J.properties file as follows:
> log4j.appender.file.file=
> F:/5chubbapps/server1/Ema/logs/torque.log
> 
> and in the Torque init file, I changed the file locations as follows:
> log4j.appender.org.apache.torque.file =
> F:/5chubbapps/server1/Ema/logs/torque.log
> 
> Still no luck..
> 
> In my WSAD 5.1 app, I have the log4J.properties file located 
> under JavaSource.. Is that correct?
> 
> Thanks,
> Jim
> 
> 
> --- Greg Monroe <[EMAIL PROTECTED]> wrote:
> 
> > In addition to needing full paths, you might not be changing the 
> > correct log4j.properties file.  If your app container uses 
> log4j, it's 
> > log4j.properties may be ignored because the server has 
> initialized it 
> > first.
> > I now Tomcat can have this problem.
> > 
> > I think there might be some tricks floating around to 
> initialize log4j 
> > for a specific app's class loader rather than using log4j's 
> auto init 
> > process.
> > 
> > > Jim Caserta said:
> > > 
> > > For some reason I am not able to get the log files
> > to write
> > > where I want them to.
> > > 
> > > In my log4j.properties file I have tried the
> > following, but
> > > neither works.. Can anyone help?
> > > Thank you. Jim
> > > 
> > > 
> > > log4j.appender.file.file= /torque.log log4j.appender.file.file= 
> > > /logs/torque.log log4j.appender.file.file= ./logs/torque.log
> > >
> >
> log4j.appender.file.file=${applicationRoot}/logs/torque.log
> > > 
> > 
> > Duke CE Privacy Statement
> > Please be advised that this e-mail and any files 
> transmitted with it 
> > are confidential communication or may otherwise be privileged or 
> > confidential and are intended solely for the individual or 
> entity to 
> > whom they are addressed.  If you are not the intended recipient you 
> > may not rely on the contents of this email or any 
> attachments, and we 
> > ask that you  please not read, copy or retransmit this 
> communication, 
> > but reply to the sender and destroy the email, its 
> contents, and all 
> > copies thereof immediately.  Any unauthorized dissemination, 
> > distribution or copying of this communication is strictly 
> prohibited.
> > 
> > 
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection 
> around http://mail.yahoo.com 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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

Reply via email to