Queries not logged:

From: Adrian (kadrianu..ahoo.com)
Date: Tue Sep 02 2003 - 16:09:03 EDT

  • Next message: Andrus Adamchik: "Re: DATETIME with mysql"

    I follow all possible indications posted in:
     
    http://www.objectstyle.org/cayenne/userguide/deploy/logging.html
     
    -Properties file on $HOME/.cayenne/
    -Default configuration (Out of the box operation using default properties file included in cayenne.jar).
    -Loading my own file using: org.objectstyle.cayenne.conf.Configuration.configureCommonLogging(url);
     
    But no query is echoed to output console (Tomcat stdout and / or log4j appender (Rolling file).
     
    My file looks like this one:
    #---------------------------------------------------------------------------
    # General Log4J stuff
    log4j.rootLogger=WARN, A1
    log4j.appender.A1=org.apache.log4j.ConsoleAppender
    log4j.appender.A1.layout=org.apache.log4j.PatternLayout
    log4j.appender.A1.layout.ConversionPattern="%d{ISO8601} - [SQL] %p: %m\n"
    # indiv. packages configuration - turning on the packages that we care about
    #log4j.logger.org.objectstyle.cayenne = INFO
    # This is the logger that controls SQL output
    # Setting the level to INFO or DEBUG will turn the logs on
    log4j.logger.org.objectstyle.cayenne.access.QueryLogger = INFO
    #--------------------------------------------------------------
    # Turn SQL tracing on
    #log4j.logger.org.objectstyle.cayenne.access.QueryLogger = INFO
    #--------------------------------------------------------------
    # Turn SQL tracing off, e.g. to increase performance
    #log4j.logger.org.objectstyle.cayenne.access.QueryLogger = WARN
    #---------------------------------------------------------------------------
     
    My application set a log4j logger instance...What I see is that cayenne creates another one because boths: my application and cayenne's output is printed twice...One time using my layout ConversionPattern and other time using cayenne´s personal one ("%d{ISO8601} - [SQL] %p: %m\n").
     
    Standard cayenne´s output like this one is printed to my log file...
     
    DEBUG logger: [('toCountry') = {[ name => USA
     provinciaArray => (org.objectstyle.cayenne.access.ToManyList)
    ]<oid: net.calhydra.helixe.dataObject.Country: <ID_COUNTRY: 20>; state: committed>}
    ]
     
    but no queries!...
     
    Any tip that helme on this issue will be appreciated...Thx in advance!

    ---------------------------------
    Do you Yahoo!?
    Yahoo! SiteBuilder - Free, easy-to-use web site design software



    This archive was generated by hypermail 2.0.0 : Tue Sep 02 2003 - 16:07:52 EDT