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

Dan Klco commented on SLING-2695:
---------------------------------

Not sure that's an advantage if you're trying to determine which class is doing 
something, but if it works then fine.

Regarding the message in AbstractResouceCollector.isPathAllowed, the problem I 
see is that it's at the debug level.  Most developers are probably not going to 
have debug logging running against the servlet resolver and I would expect that 
when I register a servlet under a path where it will never work, I would see 
something more prominent than a debug message.  Instead, maybe it should 
either: a) log a warning when the servlet is first registered or b) return an 
error code when a servlet exists at the path, but it is not allowed to execute.
                
> 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