RFR: 8336017: Deprecate java.util.logging.LoggingMXBean, its implementation, and accessor method for removal

Kevin Walls kevinw at openjdk.org
Thu Jan 23 15:39:59 UTC 2025


On Thu, 23 Jan 2025 15:23:37 GMT, Kevin Walls <kevinw at openjdk.org> wrote:

> java.util.logging.LoggingMXBean and java.util.logging.LogManager::getLoggingMXBean are deprecated since JDK-8139982 in JDK 9.
> 
> These deprecations should be uprated to state they are for future removal.
> 
> java.util.logging.Logging (implements LoggingMXBean) should also be deprecated for removal.

This area is very confusing with the old redundant implementation hanging around.

The interface `java.lang.management.PlatformLoggingMXBean` is the correct management interface for logging.  As per the java.util.LogManager documentation, can be accessed using: ManagementFactory.getPlatformMXBean(PlatformLoggingMXBean.class)

-------------

PR Comment: https://git.openjdk.org/jdk/pull/23271#issuecomment-2610129200


More information about the serviceability-dev mailing list