Hi there. You appear to be using the Cayenne 3.1 Milestone:
org.apache.cayenne.CayenneRuntimeException [v.3.1M3 Sep 12 2011 19:59:45] But you are configuring the loggers for a really old version of Cayenne: Category org.objectstyle.cayenne.access.QueryLogger set to INFO Note the "org.objectstyle" package prefix there. Cayenne 2.x and above use "org.apache" instead of "org.objectstyle". mrg On Wed, Feb 15, 2012 at 8:24 AM, ngong <[email protected]> wrote: > Dear Apache professionals, > > I need some more advises to make logging work for me. I do not know neither > CommonsLogging, nor a log4j . > > The link to "recommendations" in https://cwiki.apache.org/CAY/log4j-faq.html > does not work. > http://cayenne.apache.org/doc/configuring-logging.html seems to address > poeple with knowledge that I miss. > > I did a log4j.properties from some googleling. That seems to get read with > -Dlog4j.configDebug=true. > > But I did not get any SQL in the output. Any help would be welcome. Also > advices how to debug "commit exception" if there are better ways than > inspection of logging output (once I got them). > > The output is: > > log4j: Trying to find [log4j.xml] using context classloader > sun.misc.Launcher$AppClassLoader@1f7182c1. > log4j: Trying to find [log4j.xml] using > sun.misc.Launcher$AppClassLoader@1f7182c1 class loader. > log4j: Trying to find [log4j.xml] using ClassLoader.getSystemResource(). > log4j: Trying to find [log4j.properties] using context classloader > sun.misc.Launcher$AppClassLoader@1f7182c1. > log4j: Using URL > [file:/home/rsc/workspace/tracking/target/classes/log4j.properties] for > automatic log4j configuration. > log4j: Reading configuration from URL > file:/home/rsc/workspace/tracking/target/classes/log4j.properties > log4j: Parsing for [root] with value=[WARN, A1]. > log4j: Level token is [WARN]. > log4j: Category root set to WARN > log4j: Parsing appender named "A1". > log4j: Parsing layout options for "A1". > log4j: Setting property [conversionPattern] to [%-5p %c{1}: %m%n]. > log4j: End of parsing for "A1". > log4j: Parsed "A1" options. > log4j: Parsing for [org.objectstyle.cayenne] with value=[WARN]. > log4j: Level token is [WARN]. > log4j: Category org.objectstyle.cayenne set to WARN > log4j: Handling log4j.additivity.org.objectstyle.cayenne=[null] > log4j: Parsing for [org.objectstyle.cayenne.access.QueryLogger] with > value=[INFO]. > log4j: Level token is [INFO]. > log4j: Category org.objectstyle.cayenne.access.QueryLogger set to INFO > log4j: Handling > log4j.additivity.org.objectstyle.cayenne.access.QueryLogger=[null] > log4j: Parsing for [org.apache.cayenne.access.QueryLogger] with > value=[INFO]. > log4j: Level token is [INFO]. > log4j: Category org.apache.cayenne.access.QueryLogger set to INFO > log4j: Handling > log4j.additivity.org.apache.cayenne.access.QueryLogger=[null] > log4j: Finished configuring. > 15.02.2012 14:16:55 eu.ngong.ehour.tracking.impl.Run run > SCHWERWIEGEND: unexpected exception: class > org.apache.cayenne.CayenneRuntimeException [v.3.1M3 Sep 12 2011 19:59:45] > Commit Exception > Exception in thread "main" eu.ngong.ehour.tracking.TrackingException: > unexpected exception: class org.apache.cayenne.CayenneRuntimeException > [v.3.1M3 Sep 12 2011 19:59:45] Commit Exception > at eu.ngong.ehour.tracking.impl.Run.run(Run.java:114) > at eu.ngong.ehour.tracking.Main.main(Main.java:15) > > > -- > View this message in context: > http://cayenne.195.n3.nabble.com/logging-first-steps-tp3746967p3746967.html > Sent from the Cayenne - User mailing list archive at Nabble.com.
