You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Renaud Richardet (JIRA)" <ji...@apache.org> on 2008/09/27 10:13:44 UTC

[jira] Updated: (SLING-3) Use RequestProgressTracker to log request processing steps

     [ https://issues.apache.org/jira/browse/SLING-3?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Renaud Richardet updated SLING-3:
---------------------------------

    Attachment: RequestProgressTrackerLogFilter.diff

>having trace information in HTML comments in the page itselft would make it much easier to understand how the page was generated

What about doing it in 2-steps:

1) in RequestProgressTrackerLogFilter, save debug information (in a JCR node), add debugId parameter in response
2) add small js script on html page that gets debug information via AJAX (using debugId param)

Please see attached patch for a proof of concept. Let me know if you think it's a valid approach, and I will produce a real patch.

> Use RequestProgressTracker to log request processing steps
> ----------------------------------------------------------
>
>                 Key: SLING-3
>                 URL: https://issues.apache.org/jira/browse/SLING-3
>             Project: Sling
>          Issue Type: Improvement
>          Components: Engine, JCR Resource, Scripting, Scripting JSP, Servlets Resolver
>            Reporter: Felix Meschberger
>         Attachments: RequestProgressTrackerLogFilter.diff
>
>
> The RequestProgressTacker interface defines an API which may be used to track the process of request processing. Parties taking part in request processing, most notably resource resolution, script and servlet resolution and also request filters should track their progress in the tracker.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Updated: (SLING-3) Use RequestProgressTracker to log request processing steps

Posted by Felix Meschberger <fm...@gmail.com>.
Hi Renaud,

This is a very interesting idea and I think it would certainly be worth
adding.

Let me just add some comments:

* Could you file a new issue for this extension instead of using
SLING-3, thanks.
* You should set the response header early in the request, because the
response might already be committed at the end of the request and the
header may not get through
* I would prefix the header name with "X-" to mark it as a non-standard
header
* I would make the root location for the persistence configurable (using
@scr.property tags). A default location would be below /var, eg.
/var/log/requestprogress
* The same holds for whether to persist or not. OTOH assumming
persistence in case of enabled debug log seems reasonable.
* Maybe you might want to consider creating a a log structure, because
you would be prepared to log a whole lot of logs.

Looking forward to see a patch.

Thanks and Regards
Felix

Renaud Richardet (JIRA) schrieb:
>      [ https://issues.apache.org/jira/browse/SLING-3?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
> 
> Renaud Richardet updated SLING-3:
> ---------------------------------
> 
>     Attachment: RequestProgressTrackerLogFilter.diff
> 
>> having trace information in HTML comments in the page itselft would make it much easier to understand how the page was generated
> 
> What about doing it in 2-steps:
> 
> 1) in RequestProgressTrackerLogFilter, save debug information (in a JCR node), add debugId parameter in response
> 2) add small js script on html page that gets debug information via AJAX (using debugId param)
> 
> Please see attached patch for a proof of concept. Let me know if you think it's a valid approach, and I will produce a real patch.
> 
>> Use RequestProgressTracker to log request processing steps
>> ----------------------------------------------------------
>>
>>                 Key: SLING-3
>>                 URL: https://issues.apache.org/jira/browse/SLING-3
>>             Project: Sling
>>          Issue Type: Improvement
>>          Components: Engine, JCR Resource, Scripting, Scripting JSP, Servlets Resolver
>>            Reporter: Felix Meschberger
>>         Attachments: RequestProgressTrackerLogFilter.diff
>>
>>
>> The RequestProgressTacker interface defines an API which may be used to track the process of request processing. Parties taking part in request processing, most notably resource resolution, script and servlet resolution and also request filters should track their progress in the tracker.
> 

Re: [jira] Updated: (SLING-3) Use RequestProgressTracker to log request processing steps

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Sat, Sep 27, 2008 at 10:13 AM, Renaud Richardet (JIRA)
<ji...@apache.org> wrote:

> ...What about doing it in 2-steps:
>
> 1) in RequestProgressTrackerLogFilter, save debug information (in a JCR node), add debugId parameter in response..

Ok but I would still log the messages, to be able to use both
mechanisms: logging or browser display.

Also, I would put the full path of the logging node in the response
header, and make that a "chronological path" like
/somewhere/YYYY/MM/DD/... to be able to cleanup old debugging logs
easily.

(I think we need a Sling utility to create such paths BTW, they might
be a good option when creating nodes via SlingPostServlet. But that's
another story.)

-Bertrand