[jboss-jira] [JBoss JIRA] (WFLY-1712) Erroneous name attribute on root-logger after add-handler operation

RH Bugzilla Integration (JIRA) jira-events at lists.jboss.org
Wed Nov 20 08:53:06 EST 2013


    [ https://issues.jboss.org/browse/WFLY-1712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12925329#comment-12925329 ] 

RH Bugzilla Integration commented on WFLY-1712:
-----------------------------------------------

Rafael Ruiz <rafael.ruiz at redhat.com> made a comment on [bug 1032627|https://bugzilla.redhat.com/show_bug.cgi?id=1032627]

+++ This bug was initially created as a clone of Bug #1017881 +++

Description of problem:

Any attempt to run /subsystem=logging/logger=org.jboss.as.quickstarts.logging:assign-handler(xxx on CLI under the batch gives the following error:

{"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => "JBAS011536: Handler XXXX is already assigned."}}

This error doens't happen if the commands are not under a batch transaction


Steps to Reproduce:
1. Checkout https://github.com/jboss-developer/jboss-eap-quickstarts/tree/master/logging
2. Execute JBOSS_HOME/bin/jboss-cli.sh --connect --file=configure-logging.cli


Actual results:
{"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => "JBAS011536: Handler FATAL_QS_ASYNC is already assigned."}}

Expected results:
The batch executed successfully


Additional info:

--- Additional comment from James Perkins on 2013-10-29 12:38:10 EDT ---

I'm giving this a devel_ack+, but I don't think we should target EAP 6.2 for the fix. I can see what the issue is, but it needs to be thought through a bit. We can work around it by using the handlers property.

Example:
/subsystem=logging/logger=org.jboss.as.quickstarts.logging:add(level=TRACE, handlers=[TRACE_QS_ASYNC,DEBUG_QS_ASYNC,INFO_QS_ASYNC,WARN_QS_ASYNC,ERROR_QS_ASYNC,FATAL_QS_ASYNC])

One additional note about the scripts, the :reload isn't needed. All logging operations, minus a write-attribute to the asyn-handler's queue-length, are applied at runtime.

--- Additional comment from James Perkins on 2013-10-29 12:45:44 EDT ---

I forgot to add. I think we should delay from EAP 6.2 because the workaround is easy enough. The error is only going to occur in composite operations when using multiple add-handler operations to the same logger. 

If we need to get this into 6.2 it is possible, but at this stage I'm not sure it's worth the change for the simple workaround. Also I doubt this use-case, adding handlers to the same logger in a composite operation, is used all that often. This same issue is present in EAP 6.1.x and it's the first time I've seen it.

--- Additional comment from James Perkins on 2013-10-29 14:03:39 EDT ---

A selected the incorrect flag, I should have nack'd this one. I apologize for that.

--- Additional comment from Rafael Ruiz on 2013-11-20 07:19:06 EST ---

I have same error with EAP 6.1.1. Regardless which category you add. Putting it outside batch it works.
                
> Erroneous name attribute on root-logger after add-handler operation 
> --------------------------------------------------------------------
>
>                 Key: WFLY-1712
>                 URL: https://issues.jboss.org/browse/WFLY-1712
>             Project: WildFly
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Logging
>            Reporter: James Perkins
>            Assignee: James Perkins
>            Priority: Minor
>
> Execution of the {{add-handler}} operation adds a name attribute with the handlers name to the root-logger model.
> {code}
> "root-logger" => {"ROOT" => {
>             "filter" => undefined,
>             "filter-spec" => undefined,
>             "handlers" => [
>                 "FILE",
>                 "CONSOLE"
>             ],
>             "level" => "INFO",
>             "name" => "CONSOLE"
>         }}
> {code}

--
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


More information about the jboss-jira mailing list