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

Dan Klco updated SLING-2695:
----------------------------

    Attachment: SLING-2695.diff

Attached is a patch for switching the logger for the SlingServletResolver to be 
private static final and creating a new logger for the 
AbstractResourceCollector.  

It also has an enhancement to log an info message when a requested path is not 
inside the execution path.  The only potential problem I could see here is that 
the messages could get verbose when running a production issue, but it seems 
like there has to be something as it really isn't clear to a developer why a 
servlet wouldn't be responding to the URL if it's not in the execution path.
                
> SlingServletResolver Logging
> ----------------------------
>
>                 Key: SLING-2695
>                 URL: https://issues.apache.org/jira/browse/SLING-2695
>             Project: Sling
>          Issue Type: Improvement
>          Components: Servlets
>    Affects Versions: Servlets Resolver 2.2.0
>            Reporter: Dan Klco
>            Priority: Minor
>              Labels: patch
>         Attachments: SLING-2695.diff
>
>
> There are two odd things (to me at least) about the Sling Servlet Resolver.  
> First, the logger for this class is public static final, which means it is 
> effectively a global variable.  It is actually referenced outside the class 
> in the AbstractResourceCollector.  
> Second, when the Sling Servlet Resolver is going to resolve a request and if 
> finds that the request path is not in the servletresolver.paths set of 
> allowed paths, it sends a log message to the getRequestProgressTracker, but I 
> would think it should log at least an info message to the logs, letting the 
> developer know that the script is not going to be executed.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to