Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-1530

LogEvent.getContextStack() can return null

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.2
    • Fix Version/s: 2.7
    • Component/s: Core
    • Labels:
      None

      Description

      From the LogEvent interface:

          /**
           * Gets the context stack (also known as Nested Diagnostic Context or NDC).
           *
           * @return The context stack, never {@code null}.
           */
          ThreadContext.ContextStack getContextStack();
      

      This method does return null if nothing is added to the context stack.

      A MutableLogEvent is used, I suspect that it is not initialized correctly, Remko Popma?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mikaelstaldal Mikael Ståldal
                Reporter:
                mikaelstaldal Mikael Ståldal
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: