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

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

Commit 1557040 from [~lukaszlenart] in branch 'struts2/trunk'
[ https://svn.apache.org/r1557040 ]

WW-4274 Uses methodName instead of actionConfig#getMethodName in logging

> DefaultActionInvocation  shows invalid log
> ------------------------------------------
>
>                 Key: WW-4274
>                 URL: https://issues.apache.org/jira/browse/WW-4274
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Actions
>            Reporter: Jose L Martinez-Avial
>            Priority: Trivial
>             Fix For: 2.3.17
>
>         Attachments: WW-4274.patch
>
>
> The method invokeAction of com.opensymphony.xwork2.DefaultActionInvocation 
> logs the following line for each action it executes:
> DEBUG com.opensymphony.xwork2.DefaultActionInvocation  - Executing action 
> method = null
> I was curious about why the method was null, and find the following:
> {code:title=DefaultActionInvocation.java|borderStyle=solid}
>     protected String invokeAction(Object action, ActionConfig actionConfig) 
> throws Exception {
>         String methodName = proxy.getMethod();
>         if (LOG.isDebugEnabled()) {
>             LOG.debug("Executing action method = " + 
> actionConfig.getMethodName());
>         }
> [...]
> {code}
> but it does not use actionConfig.getMethodName() at all. It uses methodName, 
> from proxy.getMethod(). And actionConfig.getMethodName() is null if no method 
> was declared on the action definition (then it uses the standard execute). I 
> believe that the log should be modified to show methodName instead if  
> actionConfig.getMethodName(). I'm sending attached a patch for this issue.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to