[MAGNOLIA-6697] Improve log behavior/levels of: RenderingFilter.getNodedataAsStream as any 404 request will trigger a full stacktrace into the log Created: 15/Jun/16 Updated: 23/Feb/17 |
|
| Status: | Open |
| Project: | Magnolia |
| Component/s: | rendering |
| Affects Version/s: | 5.3.14, 5.4.7 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Christian Ringele | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 2 |
| Labels: | support | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| Template: |
|
||||
| Acceptance criteria: |
Empty
|
||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||
| Date of First Response: | |||||
| Description |
|
When requesting an non existing page, trying to fetch the non existing content will trigger a JCR repository exception. The thrown exception is catched in the end in: catch (RepositoryException e) { log.error("RepositoryException while reading Resource [{}]", path, e); } The problem is, that the log level is error. The only option the clinet currently have is switching of the logging of that class at all. catch (RenderException e) { // TODO better handling of rendering exception // TODO dlipp: why not move this section up to the actual call to render() -> that's the only place where a RenderException could occur... log.error(e.getMessage(), e); throw new ServletException(e); } catch (Exception e) { // TODO dlipp: there's no other checked exceptions thrown in the code above - is it correct to react like that??? log.error(e.getMessage(), e); if (!response.isCommitted()) { response.setContentType("text/html"); } throw new RuntimeException(e); } Pleas investigate into two directions: |
| Comments |
| Comment by Ilya Tatymachev [ 23/Feb/17 ] |
|
The reason of this problem and solution is quite simple. JackRabbit has three different behaviors when it can't find a resource: In first case we currently just log warning, that resource not found. block. I attached a patch to this message with a possible solution of this problem. MNGL-6697.patch |