[
https://issues.apache.org/jira/browse/CAY-1300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12795562#action_12795562
]
Andrus Adamchik commented on CAY-1300:
--------------------------------------
Copying my email to dev from Dec 14... So the current commit is a great start,
but maybe let's not rush documenting it. For one thing
"-Dcayenne.query.formatting=true" most likely be changed to an API call in the
DI container module.
--------
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...
-----
> 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, Cayenne Documentation
> 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.