Lightbulb-

to quote-
http://www.slf4j.org/nlog4j/TROUBLESHOOT.html#noAppenders
Log4j does not have a default logging target.

It is the user's responsibility to ensure that all categories can inherit an
appender. This can be easily achieved by attaching an appender to the root
category.

If you place log4j.jar in the jre/lib/ext

/**********COMMONS-LOGGING.PROPERTIES located on classpath (WEB-INF/CLASSES)
*************/
commons-logging.properties has these entries for Log4J
org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.Log4jF
actory
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JCategory
Log

/***********LOG4j.PROPERTIES located on classpath (WEB-INF/CLASSES)
***********/
log4j.properties has these entries
log4j.rootLogger = WARN, stdout

log4j.appender.stdout = org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Threshold = WARN
log4j.appender.stdout.Target   = System.out
log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern = %d{ISO8601} %-5p [%F:%L] :
%m%n

HTH
M-

----- Original Message -----
From: "lightbulb432" <[EMAIL PROTECTED]>
To: <users@tomcat.apache.org>
Sent: Saturday, December 15, 2007 7:06 PM
Subject: log4j when using Bootstrap not command-line startup


>
> I'm running Tomcat not from the command-line but from the Bootstrap
class's
> start() method. When I start it using the command-line, a logs/tomcat.log
is
> created in CATALINA_BASE, but not when I start from the Bootstrap class.
In
> fact, I get the "log4j:WARN Please initialize the log4j system properly."
> log message in the output.
>
> What is the catalina.bat file doing differently that makes properly
> initializes log4j? There are a few things relating to setting
> java.util.logging properties, but that shouldn't make a difference because
> I'm using log4j. I'm using Tomcat 6 and following the directions at
> http://tomcat.apache.org/tomcat-6.0-doc/logging.html for log4j.
>
> I imagine I've followed those directions properly because the logs are
> appearing when I run it from the command-line. And ideas of what might be
> causing this, or what should I try next?
>
> Thanks.
> --
> View this message in context:
http://www.nabble.com/log4j-when-using-Bootstrap-not-command-line-startup-tp
14356626p14356626.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to