mvanhorn opened a new pull request, #4506:
URL: https://github.com/apache/logging-log4j2/pull/4506

   **INSERT HERE** a clear and concise description of what the pull request is 
for along with a reference to the associated issue IDs, if they exist.
   
   Creating the first logger can pause application startup for several seconds 
without any indication of what caused the delay. Log4j resolves the local 
hostname synchronously during initialization. A slow resolver holds up the 
calling thread, and a successful lookup previously gave no indication of how 
long it took.
   
   NetUtils now measures the entire hostname lookup, including any fallback, 
and logs a status warning when it takes more than 100 ms. The warning reports 
the elapsed time in milliseconds and points to the local hostname resolution 
settings. The new test checks that 99 ms and 100 ms produce no warning and that 
101 ms produces one warning with the duration.
   
   `./mvnw -B -ntp -pl log4j-core -am test-compile` stopped before compilation 
because the build requires JDK 17 and detected JDK 25.
   `./mvnw -B -ntp -pl log4j-core-test -am test -Dtest=NetUtilsTest 
-Dsurefire.failIfNoSpecifiedTests=false` stopped at the Java version check 
before NetUtilsTest ran.
   `repo_lint` was invoked, but the transcript records no output or exit status.
   A run with the logging-log4j2 NetUtils change reverted gave no clear result, 
so no test is shown to catch this bug.
   The changed test 
log4j-core-test/src/test/java/org/apache/logging/log4j/core/util/NetUtilsTest.java
 did not run here: no test runner for it was available.
   
   ## Checklist
   
   * Base your changes on `2.x` branch if you are targeting Log4j 2; use `main` 
otherwise
   * The local test run for the logging-log4j2 NetUtils change to 
`log4j-core/src/main/java/org/apache/logging/log4j/core/util/NetUtils.java` 
could not complete in this environment.
   * Non-trivial changes contain an entry file in the `src/changelog/.2.x.x` 
directory
   * Tests are provided
   
   Fixes #2111
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to