java.util.logging.LogManagerthe manages the internal Logger hierarchy, and initiates Logger the configuration of the ' s, either through the Configu Ration class or configuration file.
There is a single instantiated in the LogManager whole JVM. It's a singleton, in the other words. Here's how to obtain the LogManager instance:
Logmanager manager = Logmanager.getlogmanager ();
You won't often need to interact directly LogManager with the, except for a few borderline cases.
For instance, if you want-reload the configuration file, you can do so using either of these methods:
Readconfiguration (); readconfiguration (InputStream);
The first method on LogManager the simply re-reads the configuration from file (or Class), in case these have changed.
The second method on the LogManager simply reads the configuration from the given InputStream .
You can also get access to a MXBean (Java Management Extensions) from the LogManager using the method getLoggingMXBean() . Here are an example:
Loggingmxbean MxBean = Logmanager.getloggingmxbean ();
The have more LogManager methods than these and the most often you'll not need them. Check the official JavaDoc For more information, if you need to do something not covered here.
Java Logging:logmanager