Thanks Igor.

I just checked, and there are dozens of jar files in the class path, including slf4j-api-1.5.2.jar, slf4j-log4j12-1.5.2.jar, and log4j-1.2.14.jar.

Come to think of it, I don't have any need to specifically use log4j at all. If someone can tell me how to get logging to work with slf4j, I would be happy with that.

Thanks.


Tim Koop
t...@timkoop.com <mailto:t...@timkoop.com>
www.timkoop.com <http://www.timkoop.com>

On 14/04/2010 1:52 PM, Igor Drobiazko wrote:
Tapestry logs with slf4j. You need the slf4j - log4j - bridge. Make sure
log4j-over-slf4j.jar is in the classpath.

On Wed, Apr 14, 2010 at 7:07 PM, Tim Koop<t...@timkoop.com>  wrote:

Hi everyone.  I've been using Tapestry 5 for a while.  I like it, but I
can't seem to get logging working.

In my page java class I have this:

@Inject
private Logger log;

Object onSuccess() {
    log.debug("Tim was here.");
    return null;
}

This compiles and runs.  I would like to see that message in a log file
somewhere, but I can't find it anywhere.  I've looked through Tomcat's logs
(catalina, hiost-manager, and manager), and I've looked on the console that
I started Tomcat from, but I can't find it.

I'm not using the Maven setup.  Apparently it makes a log4j.properties file
somewhere.  I tried making one and I put it in my WEB-INF/classes folder.  I
also tried putting it in WEB-INF/. Neither seemed to work.  The contents of
my log4j.properties file is this:

log4j.rootLogger=DEBUG, R
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=C:\\work\\tomcat\\logs\\timslogfile.log
log4j.appender.R.MaxFileSize=10MB
log4j.appender.R.MaxBackupIndex=10
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
log4j.logger.org.apache.catalina=ERROR, R

Does anyone have any ideas?  I'm out of ideas.

Thanks in advance.

--
Tim Koop
t...@timkoop.com<mailto:t...@timkoop.com>
www.timkoop.com<http://www.timkoop.com>



Reply via email to