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.
>
>
This archive was generated by hypermail 2.0.0 : Mon Dec 14 2009 - 09:47:19 EST