I'm having trouble logging b/t turbine, my app and the various services.
I'm using the recently-posted tdk 2.2_01 and have tailored the
log4j.properties file in the WEB-INF/conf folder to my heart's content. The
unfortunate part is that Turbine seems to be completely ignoring it. The
logging facilities in the TurbineResources.properties file are still
loading and logging acceptably. However (and this is what's really bugging
me ... OCD perhaps) every time I start up tomcat I get:
log4j:WARN No appenders could be found for logger
(org.apache.stratum.component.ComponentLoader).
log4j:WARN Please initialize the log4j system properly
and it's been doing this since I began using the TDK; it's one of my few
remaining loose ends which is what makes it so frustrating. If I have a
conf/log4j.properties file, is it automatically parsed? If not (it doesnt
seem to be considering assigning an appender to stratum in that file does
nothing to sway the error message) can I just include all the properties
from that file in TurbineResources.properties? Placing:
services.LoggingService.classname=org.apache.turbine.services.logging.Log4JavaLogger
log4j.category.com.genelogic.project = ALL, com.genelogic.project
log4j.appender.com.genelogic.project = org.apache.log4j.FileAppender
log4j.appender.com.genelogic.project.file = /CVS/project/logs/project.log
log4j.appender.com.genelogic.project.layout =
org.apache.log4j.PatternLayout
log4j.appender.com.genelogic.project.layout.conversionPattern = %d [%t] %
-5p %c- %m%n
log4j.appender.com.genelogic.project.append = true
Doesn't seem to do a thing ... no project.log is created. AND to top things
off a velocity.log is created during runtime and I have no indication of
where exactly that might be setup and configured; such a thing is never
mentioned in any of the .properties files I have in /WEB-INF/conf.
Can anyone clear up what I must be missing?
-j
Laurie Harper
<[EMAIL PROTECTED] To:
[EMAIL PROTECTED]
et> cc:
Subject: Re: Logging configuration
12/17/2002 09:14
PM
Please respond to
"Turbine Users
List"
Paul Smith wrote:
> services.LoggingService.logforj.log4j.rootCategory = DEBUG, logforj
> is analogous to (I think):
> log4j.rootCategory = DEBUG, logforj
Hmm, so I could probably pull the content of log4.properties into
Turbine.properties if I wanted to :-)
> My recommendation is to leave Turbine's logging wrapper aside and just
use
> Log4J for you own app's logging. Turbine's logging is great and simple
to
> get started, but if you need extra features (like Daily/Weekly rotation)
> you'll need to go straight through to work with Log4J.
There's every chance the next version of Turbine will have abolished the
logging service too, for what I've read. Besides, I don't want to have
to remember to use one API in the Turbine parts of my project and
another elsewhere... ;-)
L.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>