Preventing a Logger from Forwarding Log Records to Its Parent
import java.util.logging.Logger; public class Main { public static void main(String[] argv) throws Exception { Logger logger = Logger.getLogger("com.mycompany"); // Stop forwarding log records to ancestor handlers logger.setUseParentHandlers(false); // Start forwarding log records to ancestor handlers logger.setUseParentHandlers(true); } }