Use the same approach as Logger::defaultLogger() to ensure that the appender is not destroyed before shared object destructor function is executed.
The alternative is to delete dcon() function, but we might run into a similiar tear-down issue later (e.g. logging from some object's destructor). ============================== Test summary ============================== TEST TOTAL PASS FAIL ERROR jtreg:test/jdk/tools 215 215 0 0 ============================== TEST SUCCESS ------------- Commit messages: - Avoid destroying log appenders set in launch() function. Changes: https://git.openjdk.org/jdk/pull/14971/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14971&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8312488 Stats: 10 lines in 1 file changed: 5 ins; 0 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/14971.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14971/head:pull/14971 PR: https://git.openjdk.org/jdk/pull/14971