You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2014/12/16 06:34:13 UTC

[jira] [Commented] (OAK-2302) Simplify query debugging with MDC

    [ https://issues.apache.org/jira/browse/OAK-2302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14247796#comment-14247796 ] 

Chetan Mehrotra commented on OAK-2302:
--------------------------------------

For the record to see how this feature can be used have a look at {{ExplainQueryServlet}} [1]. There only explain related logs are collected by making use of this feature

[1] https://github.com/Adobe-Consulting-Services/acs-aem-tools/blob/master/bundle/src/main/java/com/adobe/acs/tools/explain_query/impl/ExplainQueryServlet.java#L358

> Simplify query debugging with MDC
> ---------------------------------
>
>                 Key: OAK-2302
>                 URL: https://issues.apache.org/jira/browse/OAK-2302
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: query
>            Reporter: Chetan Mehrotra
>            Assignee: Chetan Mehrotra
>            Priority: Minor
>             Fix For: 1.0.9, 1.1.3
>
>         Attachments: OAK-2302.patch
>
>
> QueryEngine in Oak has support for {{explain}} and {{measure}} to enable a user to determine how a query is executed by the engine. Result returned via explain call just tell what index would be used to execute the query. However often we need to see which all indexes were consulted and what cost were obtained from them.
> To get that data one has to enable debug level log for {{org.apache.jackrabbit.oak.query}}. Enabling them on a bigger system often results in lots of logs due to invocation of queries done by various part. Mostly the log is flooded with reference query invoked by authentication layer thus making it hard to find out relevant logs.
> To simplify getting only debug level logs for query which had explain enabled it would be helpful to provide support via MDC [1] (which is part of Slf4j API already being used in Oak)
> (patch and usage details to follow)
> [1] http://logback.qos.ch/manual/mdc.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)