Quck and dirty, since my first Tapestry project was also the first
time I worked with log4j:

This warning is gonna show up until you declare a log4j.properties file.

Put it here:
http://wiki.apache.org/tapestry/Tapestry5WhereToStoreConfigurationResources


The file can be simple or even blank I think.

You can just use this to stop it from complaining:

log4j.rootCategory=debug, 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{1} %m%n

#comment out like this
#log4j.category.org.apache.tapestry=error
#log4j.category.tapestry=error

log4j.category.com.mycompany.myapp.somepackage=debug
log4j.category.com.mycompany.myapp.somepackage.specificclass=info
log4j.category.org.thirdparty.theirapp.somepackage=error





Overall, using the logging ability here is a cheap way to improve your
code!  No more System.out.println() !

I think you can inject the logger, but I am doing it like this in my code:

public class MyClass {
        private static Logger logger = Logger.getLogger(MyClass.class);

public someMethod(){
  logger.debug("Here's a debug statement (Most verbose level)");

  logger.info("Here's some info (use for information) ");

  logger.error("Here's an error (only use for errors)");
}
....
}


On 10/5/07, jblier <[EMAIL PROTECTED]> wrote:
>
> Is log4j needed to build Tapestry projects? What does is stand for?
>
> With 5.0.6-SNAPSHOT I get this error when running the application:
>
> log4j:WARN No appenders could be found for logger
> (org.mortbay.util.Container).
> log4j:WARN Please initialize the log4j system properly.
>
> With 5.0.5 No errors are flagged.
> --
> View this message in context: 
> http://www.nabble.com/T5%3A-Newbie-question---what-is-log4j--tf4577247.html#a13066138
> Sent from the Tapestry - User mailing list archive at Nabble.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