You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by Andrus Adamchik <an...@objectstyle.org> on 2009/12/14 15:46:43 UTC

Re: [jira] Updated: (CAY-1300) Format queries in QueryLogger

Good stuff, but here is a suggestion...

Maybe instead of an extra configuration option on the logger, we use  
the new 3.1 DI container to change behavior application-wise based on  
the user preference:

http://cayenne.apache.org/doc/dependency-injection-container.html

Instead of a static logger we'll then have an injectable logger that  
is registered with the container. The current one will be the default.  
We can provide a pretty-print logger (per your patch) as an  
alternative that users can register. And finally users can provide  
their own to do something entirely different.

Essentially replacing if/else with pluggable strategies...

Andrus

On Dec 14, 2009, at 9:39 AM, Evgeny Ryabitskiy (JIRA) wrote:

>
>    [ https://issues.apache.org/jira/browse/CAY-1300?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel 
>  ]
>
> Evgeny Ryabitskiy updated CAY-1300:
> -----------------------------------
>
>   Attachment: CAY-1300.patch
>
> Rewrite Formatting engine. Now it's easy expandable and much nicer
>
>> Format queries in QueryLogger
>> -----------------------------
>>
>>               Key: CAY-1300
>>               URL: https://issues.apache.org/jira/browse/CAY-1300
>>           Project: Cayenne
>>        Issue Type: New Feature
>>        Components: Cayenne Core Library
>>          Reporter: Evgeny Ryabitskiy
>>          Assignee: Evgeny Ryabitskiy
>>           Fix For: 3.1M1
>>
>>       Attachments: CAY-1300.patch, CAY-1300.patch
>>
>>
>> Sometimes it's hard to read queries from Logs when queries are huge.
>> It will be nice if user can enable nice query formatting for debug  
>> purposes.
>
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>