cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: [jira] Commented: (CAY-1464) Improve QueryLogger to log more information
Date Mon, 02 Aug 2010 08:50:19 GMT
Hi Evgeny,

On Aug 1, 2010, at 6:13 PM, Evgeny Ryabitskiy (JIRA) wrote:
> Evgeny Ryabitskiy commented on CAY-1464:
> ----------------------------------------
>
> + 1 for flexibility at this level.
>
> Now we should think about what to path to this events, I mean some  
> interface for it.
>
> And I am still think that default Cayenne logger can be Improved  
> without "incur much performance overhead", to provide nice logging  
> "out of box". That was patch about.


Just took a brief look at the patch... I have some minor notes about  
error messages and such, but here are a few things that I have doubts  
about:

* Looks like you patch will log all fetched objects? If this is the  
case, it is definitely a bad idea. There can be *lots* of them.
* What is the benefit of passing start time instead of time delta in  
the logger? IMO the "old" API was cleaner, separating time measurement  
from logging.

> + There could be several build-in loggers that could be "turned on"  
> just by one simple option.
>
> 1) Default Logger
> 2) Formatted logger (move format issues here).
> 3) Some supper logger that could provide lot's of output.

Yep. DI container is already a reality, so switching to a DI-based  
logger should be fairly starightforward (we'll need to figure out  
injection into lower level objects underneath DataDomain). This is on  
my TODO list. If somebody decides to do it before I get to it, please  
open a Jira and let me know.

Andrus


Mime
View raw message