cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lawrence Gerstley <>
Subject Re: Set a query logging level
Date Thu, 24 Sep 2009 21:06:25 GMT
Just following the earlier documentation, and trying to describe to a  
team how they can elevate an individual query for debugging purposes.   
To whit (from the 2.0 documentation):

When SQL tracing is turned off, it is possible to log the execution of  
only certain queries or commits by manually increasing the logging  
level of just a specific query above the level configured for the  
QueryLogger. This is a very convenient feature for debugging the code,  
since it reduces the level of noise in the logs, focusing attention on  
the queries that are important. This API is discussed in the FAQ.   

I agree that this would be useful in our scenario, when we're working  
on tuning performance, working on best use of prefetching, etc. So  
that was my interest, now that I have log4j working correctly.

On Sep 24, 2009, at 12:48 PM, Andrus Adamchik wrote:

> Per query logging levels existed in the early versions of Cayenne,  
> but got killed quite some time ago. IMO, though occasionally  
> convenient, this goes against good logging practices. What case are  
> you trying to address with it?
> Andrus
> On Sep 24, 2009, at 10:37 PM, Lawrence Gerstley wrote:
>> Hi,
>> I've been searching through documentation and Googling for some  
>> time to see how to elevate the logging level of an individual  
>> query, and came across the type of function is was looking for, but  
>> which seems to be more hypothetical than real (i.e., it's not in  
>> the Query object):
>> SelectQuery sq = new SelectQuery(Some.class);
>> sq.setLoggingLevel("INFO");
>> I've got log4j working in 3.0 and the configuration file working  
>> just fine. Is there some simple example of elevating just one query.
>> Also, just an FYI: the Wiki link on the home page seems to be quite  
>> dead.
>> Thanks in advance,
>> Lawrence

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message