I generally base my log4j.properties from the tapestry quickstart archetype... replace ${package} with your app package (com.yourcompany.yourapp) Maybe this will help. You might try using the quickstart to create a simple project and see if the logging works with the rest of your environment, sometimes it helps to have something that works to compare.
# Default to info level output; this is very handy if you eventually use Hibernate as well. log4j.rootCategory=info, A1 # A1 is set to be a ConsoleAppender. log4j.appender.A1=org.apache.log4j.ConsoleAppender # A1 uses PatternLayout. log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=[%p] %c{2} %m%n # Service category names are the name of the defining module class # and then the service id. log4j.category.${package}.services.AppModule.TimingFilter=info # Outputs a list of pages, components and mixins at startup. log4j.category.org.apache.tapestry5.services.TapestryModule.ComponentClassResolver=info # Outputs startup statistics; elapsed time to setup and initialize the registry, and a list of # available services. log4j.category.org.apache.tapestry5.TapestryFilter=info # Turning on debug mode for a page's or component's transformer logger # will show all of the code changes that occur when the # class is loaded. # log4j.category.tapestry.transformer.${package}.pages.Index=debug # Turning on debug mode for a component's events logger will show all the events triggered on the # component, and which component methods are invoked as a result. # log4j.category.tapestry.events.${package}.pages.Index=debug # Turning on trace mode for a page's render logger provides extended information about every step # in rendering (this is not generally helpful). Turning on debug mode will add a one-line # summary that includes the elapsed render time, which can be useful in tracking down # performance issues. # log4j.category.tapestry.render.${package}.pages.Index=debug # Turn on some verbose debugging about everything in the application. This is nice initially, # while getting everything set up. You'll probably want to remove this once you are # up and running, replacing it with more selective debugging output. log4j.category.${package}=debug On Wed, Apr 28, 2010 at 9:57 AM, Tim Koop <t...@timkoop.com> wrote: > This is where I'm at. It's not working. > > I have a log4j.properties file in tomcat/conf which has these lines: > > log4j.appender.tomcat = org.apache.log4j.RollingFileAppender > log4j.appender.tomcat.File = ${catalina.base}/logs/tomcat.log > log4j.appender.tomcat.MaxFileSize = 10MB > log4j.appender.tomcat.MaxBackupIndex = 10 > log4j.appender.tomcat.layout = org.apache.log4j.PatternLayout > log4j.appender.tomcat.layout.ConversionPattern = %p %t %c - %m%n > log4j.rootLogger = INFO, tomcat > > > Then I have another log4j.properties in my WEB-INF/classes folder with these > lines: > > log4j.appender.console = org.apache.log4j.ConsoleAppender > log4j.appender.console.layout = org.apache.log4j.PatternLayout > log4j.appender.console.layout.ConversionPattern = %p %t %c - %m%n > log4j.logger.myapp = DEBUG, console > > > All my page and other packages begin with "myapp". > > When I try to log something using "info", it does show up in the tomcat.log > file. However, it does not show up on the console like I would like it to. > When I moved the lines from that file into the tomcat/conf/log4j.properties > file, it all worked fine. So basically, my > WEB-INDF/classes/log4j.properties file is being ignored. > > Why is my log4j.properties file being ignored? I even have its location > specified in my web.xml file. > > What's going on? > > Thanks. > > -- > Tim Koop > <mailto:t...@timkoop.com> > On 16/04/2010 3:05 PM, Peter Stavrinides wrote: >>> >>> You need a log4j.properties file in $CATALINA_HOME/lib >>> >> >> Or in the classes directory at runtime... to ensure its always in the >> right place simply put the log4j.properties or log4j.xml file is in the >> src/main/resources root folder. >> >> regards, >> Peter >> > -- -- http://www.bodylabgym.com - a private, by appointment only, one-on-one health and fitness facility. -- http://www.ectransition.com - Quality Electronic Cigarettes at a reasonable price! -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org