Logger parent = Logger.getLogger("parent"); Logger child = Logger.getLogger("parent.child"); Logger parentOfChild = child.getParent();
Logger logger = Logger.getLogger("com.example.myapp"); Logger rootLogger = logger.getParent();In this example, rootLogger would be equal to the root logger. This method is provided by the java.util.logging package library.