arturobernalg commented on PR #1057:
URL: https://github.com/apache/tomcat/pull/1057#issuecomment-6690333903

   Tested locally on top of current main (JDK 21 and 27, Linux). I built Tomcat 
Native 2.0.17 from source, plus a copy reporting 2.0.15 (below the required 
2.0.16) to force the incompatible-version path.
   
   - Native 2.0.17: `version.sh` output is identical to main (APR loaded: true, 
APR 1.7.6, Tomcat Native 2.0.17, OpenSSL 3.6.5).
   - Native 2.0.15: main prints a stray timestamped "SEVERE: An incompatible 
version [2.0.15] ..." line in the middle of the output. With this patch there 
is no stray line, and the reason is printed indented under "APR loaded: false". 
Same result on JDK 21 and 27.
   - No native library: output is clean.
   - TestServerInfo passes (22 run, 0 failures, 6 skipped) and `ant validate` 
passes.
   
   Two remarks.
   
   1. `main()` changes the level and disables parent handlers on three loggers 
and never restores them. In a JVM where `main()` is called more than once, or 
the loggers are used afterwards, their output stays suppressed. Repeated 
invocations also accumulate handlers, as the previously registered handlers are 
never removed. Could the original level and useParentHandlers be restored, and 
the handler removed, in a finally block? Holding the loggers in local variables 
for the duration of `main()` is enough to keep them from being garbage 
collected, so the static `capturedLoggers` field would no longer be needed.
   
   2. Only AprLifecycleListener messages are re-emitted. Records from 
OpenSSLLifecycleListener and the panama OpenSSLLibrary are captured and then 
discarded, so a WARNING or SEVERE from the FFM path would not be shown 
anywhere. I could not exercise that path locally. Is that intentional?


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to