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

LogEvent.getContextStack() can return null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.6.2
    • 2.7
    • Core
    • 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, remkop@yahoo.com?

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: