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

Change in shutdown behaviour between 2.12.1 and 2.13.0

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.13.0
    • Fix Version/s: 2.13.1
    • Component/s: API
    • Labels:
      None
    • Environment:

      Description

      The attached mavenised example demonstrated the observed behaviour.

      In essence the following is observed:

      // Shutdown Log4J2
      LogManager.shutdown(); // line 1
      // LogManager.shutdown(LogManager.getContext(false)); // line 2
      Files.delete(logFile); // line 3
       
      

      Using line 1; line 3 above should execute with no exceptions. For v2.12.1 this is observed. For v2.13.0; line 3 throws an exception because the logFile has a open lock still active.

      When line 2 is substituted for line 1. Line 3 executes with no exception for both v2.12.1 and v2.13.0

      I was able to determine that this behavior change was introduced by LOG4J2-2716 (253ada6ff2fb6c6a0dcfee8ed432372215f2ef78).

        Attachments

        1. Log4J Shutdown Example.zip
          4 kB
          Brad Walker

          Activity

            People

            • Assignee:
              rgoers Ralph Goers
              Reporter:
              bwalker Brad Walker
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: