struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-5028) Dispatcher prints stacktraces directly to the console
Date Sat, 20 Apr 2019 04:45:00 GMT

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

ASF subversion and git services commented on WW-5028:
-----------------------------------------------------

Commit f0776aeac6297c849b14921debec4c9cb5653c37 in struts's branch refs/heads/master from
JCgH4164838Gh792C124B5
[ https://gitbox.apache.org/repos/asf?p=struts.git;h=f0776ae ]

(Amended commit based on feedback)
Proposed fix for WW-5028 for the 2.5.x branch:
- Disable printing stacktrace on exceptions by the Dispatcher by default.
- Printing stacktrace on exception is only enabled with devMode set to true, as suggested
by L. Lenart.
- Now prints stacktrace on exception using LOG, as suggested by A. Mashchenko and the the
JIRA reporter.
  Log level set to debug as recommended by Y. Zamani.
- Added two additional unit tests for Dispatcher devMode and handleException states.

(cherry picked from commit 4815744)


> Dispatcher prints stacktraces directly to the console
> -----------------------------------------------------
>
>                 Key: WW-5028
>                 URL: https://issues.apache.org/jira/browse/WW-5028
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Dispatch Filter
>    Affects Versions: 2.5.18
>            Reporter: Stuart Harper
>            Priority: Minor
>             Fix For: 2.5.21, 2.6
>
>
> After upgrading from Struts 2.3.x to 2.5.x we noticed a stack trace in our logs which
was not previously present. The error is actually quite minor and doesn't impact any functionality,
the problem is we have no ability to control its presence in our logs do the way the Dispatcher.java
prints directly to the console.
> This can be seen in class org.apache.struts2.dispatcher.Dispatcher around line 586
> Only after the error is printed is a check made on whether to handle it. The exception
is then rethrown.
> I think it would make more sense to use the logging framework to log exceptions or otherwise
give us some control over whether this appears. As it is it's impossible to turn it off.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message