log4j looks for this file in the root of the classpath, so you need to
place it there. We run cayenne on top of a Java "classes" hierarchy, so we
always place it there.
There is also an XML format for log4j, which we prefer to use (we have more
tools that work on deployment), but this is not documented so well. We
figured it out from the examples located below the log4j source at:
$ROOT/src/java/org/apache/log4j/xml/examples/
Jim Menard <jim..o.com> writes:
> Mike,
>
> On Mar 16, 2004, at 2:55 AM, Mike Elliott wrote:
>
> > I've never quite gotten a clear picture of how logging is done in
> > Cayenne. If
> > I follow the examples I will get console log output of queries.
> > That's good.
> > If, on the other hand, I decide to write a program where I try to
> > explicitly
> > use the logging facility, I get complaints like the following:
> >
> > log4j:WARN No appenders could be found for logger (root).
> > log4j:WARN Please initialize the log4j system properly.
> >
> > What, may I ask, is required to "initialize the log4j system
> > properly" and how
> > do I, for instance, cause log.debug( "Hello" ) to cause "Hello" to
> > appear in
> > the log? Or, am I doing it totally wrong and I need to do something
> > else?
>
> It took me a while to figure out the correct Log4J incantations. The
> online manual at http://logging.apache.org/log4j/docs/manual.html was
> very helpful. I've attached a copy of my log4j.properties file below.
>
>
>
>
> Jim
> --
> Jim Menard, jim..o.com, http://www.io.com/~jimm/
> Crash Windows XP in two lines of code:
> #include <stdio.h>
> main(void) { int i; for(i = 0; i < 5 ; i++) printf("\t\t\b\b\b"); }
>
-- Mark Evenson <evenso..anix.com>"A screaming comes across the sky. It has happened before, but there is nothing to compare to it now."
This archive was generated by hypermail 2.0.0 : Wed Mar 17 2004 - 12:13:01 EST