Stream Handler
import java.io.OutputStream; import java.util.logging.Logger; import java.util.logging.SimpleFormatter; import java.util.logging.StreamHandler; public class Main { public static void main(String[] args) { Logger logger = Logger.getLogger("logging"); OutputStream outStream = System.out; StreamHandler handler = new StreamHandler(outStream, new SimpleFormatter()); logger.addHandler(handler); logger.setUseParentHandlers(false); logger.info("StreamHandler is working"); } }