You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Bryan Lewis <jb...@gmail.com> on 2009/04/03 21:50:39 UTC
pruning the querylogger
This might be an obvious question but I couldn't find it in the list and docs.
In our old Cayenne-2-based apps, we selectively pruned the query
logging to avoid cluttering our log files with uninteresting
repetitive queries. We used QueryLogger.setLoggingLevel() before each
performQuery(). Yeah, it was a bit tedious and I'm not surprised to
see setLoggingLevel() has gone away. But if we still want to prune
the logging, how do we do it?
Thanks.
Re: pruning the querylogger
Posted by Bryan Lewis <jb...@gmail.com>.
Cool, works well. Thanks.
On 4/5/09, Andrus Adamchik <an...@objectstyle.org> wrote:
> Hi Bryan,
>
> Log4J itself should be used to configure things like this. You can
> have a custom appender for instance with some thread-local API to turn
> it on and off.
>
> Andrus
>
> On Apr 3, 2009, at 10:50 PM, Bryan Lewis wrote:
>
>> This might be an obvious question but I couldn't find it in the list
>> and docs.
>>
>> In our old Cayenne-2-based apps, we selectively pruned the query
>> logging to avoid cluttering our log files with uninteresting
>> repetitive queries. We used QueryLogger.setLoggingLevel() before each
>> performQuery(). Yeah, it was a bit tedious and I'm not surprised to
>> see setLoggingLevel() has gone away. But if we still want to prune
>> the logging, how do we do it?
>>
>> Thanks.
>>
>
>
Re: pruning the querylogger
Posted by Andrus Adamchik <an...@objectstyle.org>.
Hi Bryan,
Log4J itself should be used to configure things like this. You can
have a custom appender for instance with some thread-local API to turn
it on and off.
Andrus
On Apr 3, 2009, at 10:50 PM, Bryan Lewis wrote:
> This might be an obvious question but I couldn't find it in the list
> and docs.
>
> In our old Cayenne-2-based apps, we selectively pruned the query
> logging to avoid cluttering our log files with uninteresting
> repetitive queries. We used QueryLogger.setLoggingLevel() before each
> performQuery(). Yeah, it was a bit tedious and I'm not surprised to
> see setLoggingLevel() has gone away. But if we still want to prune
> the logging, how do we do it?
>
> Thanks.
>