LogManager readConfiguration() method in Java with Examples Last Updated : 26 Sep, 2021 Comments Improve Suggest changes Like Article Like Report 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 Syntax: 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: Java // Java program to illustrate // LogManager readConfiguration() method import java.util.logging.*; import java.util.*; public class GFG { public static void main(String[] args) { try { // Create LogManager object LogManager logManager = LogManager.getLogManager(); System.out.println("LogManager: " + logManager); System.out.println( "Reading the configuration " + "using readConfiguration() method"); logManager.readConfiguration(); } catch (Exception e) { System.out.println(e); } } } Output: LogManager: java.util.logging.LogManager@1540e19d Reading the configuration using readConfiguration() method java.security.AccessControlException: access denied ("java.util.logging.LoggingPermission" "control") Reference: https://docs.oracle.com/javase/9/docs/api/java/util/logging/LogManager.html#readConfiguration-- Comment More infoAdvertise with us Next Article LogManager readConfiguration() method in Java with Examples G guptayashgupta53 Follow Improve Article Tags : Java Java-Functions java.util.logging package Java-LogManager Practice Tags : Java Similar Reads LogManager reset() method in Java with Examples The reset() method of java.util.logging.LogManager is used to reset the logging configuration. This method throws SecurityException if the exception condition occurs, as given below Syntax: public void reset() throws SecurityException Parameters: This method does not accepts any parameter. Return Va 1 min read Logger throwing() method in Java with Examples throwing(String sourceClass, String sourceMethod, Throwable thrown) method is used to Log throwing an exception.In many scenario method is closed by throwing an exception then this is a very helpful method to log that a method is terminating by throwing an exception. The logging is done using the FI 2 min read Logger setParent() method in Java with Examples setParent() method of a Logger class used to set the parent Logger of this current Logger.The parent Logger we want to set is passed as a parameter. LogManager use this method to update a Logger when the namespace changes. Syntax: public void setParent(Logger parent) Parameters: This method accepts 2 min read Logger setFilter() method in Java with Examples setFilter() method of a Logger class is used to set a filter to control output on this Logger. The filter is passed as a parameter. A Filter is useful to filter out log messages. It can be said that the filter decides the message gets to be logged or not. Filters are represented by the Java interfac 2 min read Logger removeHandler() method in Java with Examples removeHandler() method of a Logger class is used to remove a log Handler from Logger. A Handler is a component of JVM that takes care of actual logging to the defined output writers like a file, console out etc. It returns silently if the given Handler is not found or is null.Syntax: public void rem 2 min read Like