Re: Extensive DEBUG Logging when using a WebApplicationListener

From: Stefaan Huysentruyt (cayenne.user..inimoa.net)
Date: Thu Sep 23 2004 - 16:04:46 EDT

  • Next message: André Luiz do Nascimento Sousa: "Problem with RTRIM() Function in DB2 v.5 for MVS/OS-390"

    Thanks everybody,

    Log4j in practice is pretty new to me.

    Copying and editing the .cayenne/cayenne-log.properties to the source and
    classes directory did the trick.

    But as Andrus suggests, hooking up your logging configuration when the
    context is initialized is probably the way to go.

    On 23-sep-04, at 19:06, Andrus Adamchik wrote:
    > I think the cause of the problem is that cayenne.jar has a default
    > logging properties file (under
    > cayenne.jar:.cayenne/cayenne-log.properties)

    > For RC1 I will change the default to be INFO, not DEBUG.
    > Regardless of this in the web application I suggest subclassing
    > WebApplicationListener with a simple custom subclass that overrides
    > this method:
    >
    > public void contextInitialized(ServletContextEvent sce) {
    > // configure log4j logging, before Cayenne does, e.g.:
    > URL myLog4JpropsURL = ...
    >
    > org.objectstyle.cayenne.conf.Configuration.configureCommonLogging(myLog4
    > JpropsURL);
    >
    > super.contextInitialized(sce);
    > }
    >

    With every little bit of power, there is need for a little bit of skill.

    Stefaan Huysentruyt



    This archive was generated by hypermail 2.0.0 : Thu Sep 23 2004 - 16:04:50 EDT