Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-6476

Reducing logging level for failed internal read-only operation steps

XMLWordPrintable

    AbstractOperationContext.executeStep logs at ERROR level a stack trace for any step that fails in Stage.RUNTIME. There are two reasons for this behavior:

    1) A Stage.RUNTIME step may affect server state, e.g. the MSC container, so any failure there deserves logging.
    2) We have no idea what an external caller will do with the operation response, so we can't make any assumptions about proper handling, and need to record data in case it's needed for later analysis.

    However, due to the WFCORE-6386 work we now have solid knowledge if a step is configured as read-only and has indeed has not done anything but reads. We can also check the AccessMechanism of callers and thus detect internal callers, who presumably should be handling failed operations they initiate. So for failures in these kinds of steps we can consider logging the failure at DEBUG instead of ERROR. (We could also not log them at all, but then we'd lose fairly easy debugging of unexpected problems.)

      1. server.log
        1.99 MB
        Miroslav Novak

            bstansbe@redhat.com Brian Stansberry
            bstansbe@redhat.com Brian Stansberry
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: