Re: Configuring Logging

From: Mike Kienenberger (mkienen..mail.com)
Date: Wed Apr 26 2006 - 10:38:15 EDT

  • Next message: Cypher !: "caching persistent objects"

    I typically use

    log4j.logger.org.objectstyle.cayenne = INFO
    log4j.logger.org.objectstyle.cayenne.access.QueryLogger = WARN

    You could use

    log4j.logger.org.objectstyle.cayenne = ERROR
    log4j.logger.org.objectstyle.cayenne.access.QueryLogger = ERROR

    This line of code has also worked for me, although it's currently commented out.

            // Configuration.configureCommonLogging(new
    File("log4j.properties").toURL());

      Note that you'd have to call it before calling

            Configuration.initializeSharedConfiguration(conf);

    On 4/26/06, emre.yilma..tr.com.tr <emre.yilmaz@htr.com.tr> wrote:
    > Hi,
    >
    > I set the below parameters but logging not changed. How can I stop the cayenne logging?
    >
    > java.net.URL url = DbObject.class.getResource("resources/cayenne/mssql/cayenne-log.properties");
    > org.objectstyle.cayenne.conf.Configuration.configureCommonLogging(url);
    > --------------------------------------
    > log4j.rootLogger=ERROR, A1
    > log4j.appender.A1=org.apache.log4j.ConsoleAppender
    > log4j.appender.A1.layout=org.apache.log4j.PatternLayout
    > log4j.appender.A1.layout.ConversionPattern=cayenne %-5p [%t %d{MM-dd HH:mm:ss}] %c{1}: %m%n
    > log4j.logger.org.objectstyle.cayenne.access.QueryLogger =ERROR
    > log4j.logger.org.objectstyle.cayenne.access.QueryLogger = ERROR
    > log4j.logger.org.objectstyle.cayenne.access.QueryLogger = ERROR
    > log4j.logger.org.objectstyle.cayenne.conf = ERROR
    > log4j.logger.org.objectstyle.cayenne.util = ERROR
    > ----------------------------------------
    >
    >



    This archive was generated by hypermail 2.0.0 : Wed Apr 26 2006 - 10:38:39 EDT