LogManager readConfiguration() method in Java with Examples
The readConfiguration() method of java.util.logging.LogManager is used to read and initialize the default configuration. This method throws IOException and SecurityException if the exception condition occurs, as given below
public void readConfiguration() throws IOException, SecurityException
Parameters: This method does not accepts any parameter.
Return Value: This method does not return anything. It just reads and initializes the logging configuration.
Exceptions: This method throws following exceptions:
- IOException: if any IO error occurs while reading the configuration.
- SecurityException: if a security manager exists while the caller does not have logging permissions.
Below programs illustrate readConfiguration() method:
Reading the configuration using readConfiguration() method
java.security.AccessControlException: access denied (“java.util.logging.LoggingPermission” “control”)