LogManager checkAccess() method in Java with Examples Last Updated : 29 Oct, 2019 Comments Improve Suggest changes Like Article Like Report The checkAccess() method of java.util.logging.LogManager is used to check if this context has the permissions to modify the logging configuration, which requires LoggingPermission("control"). This method throws SecurityException if the exception condition occurs, as given below Syntax: public void checkAccess() throws SecurityException Parameters: This method does not accepts any parameter. Return Value: This method does not return anything. It just checks if this context has the permissions to modify the logging configuration. Exceptions: This method throws following exceptions: SecurityException: if a security manager exists while the caller does not have logging permissions. Below programs illustrate checkAccess() method: Java // Java program to illustrate // LogManager checkAccess() 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( "Checking for permissions\n"); // Checking for permissions // using checkAccess() method logManager.checkAccess(); } catch (SecurityException e) { System.out.println("Permission Denied"); } } } Output: LogManager: java.util.logging.LogManager@1540e19d Checking for permissions Permission Denied Reference: https://docs.oracle.com/javase/9/docs/api/java/util/logging/LogManager.html#checkAccess-- Comment More infoAdvertise with us Next Article LogManager checkAccess() 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 addLogger() method in Java with Examples The addLogger() method of java.util.logging.LogManager is used to insert the specified Logger in this LogManager instance. This Logger must be a named Logger. This method will add this Logger in this LogManager if it does not exist already. If it exists already, then this method returns false. Synta 2 min read 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 entering() method in Java with Examples The entering() method of a Logger class used to Log a method entry. There are three types of entering() method depending upon the parameters passed. entering(String sourceClass, String sourceMethod): This method is used to Log a method entry.Actually many times in application development we need to 4 min read Logger config() method in Java with Examples The config() method of a Logger class used to Log an config message. This method is used to pass config types logs to all the registered output Handler objects. Config Level: Configuration Information may be like what CPU the application is running on, how much is the disk and memory space. There ar 3 min read LogManager getLogger() method in Java with Examples The getLogger() method of java.util.logging.LogManager is used to get the specified Logger in this LogManager instance. This Logger must be a named Logger. This method will get this Logger in this LogManager if it exists. If it does not exists, then this method returns null. Syntax: public Logger ge 2 min read Like