How can use the built in logger utility to wirte log messages to a file?
I am new to JDK 6 and want to have my log output go to a file AND the console. The below code works for me, but it only writes to the console. Any suggestions on how to make it write to a file AND console?
Logger l = Logger.getAnonymousLogger(); l.setLevel(Level.ALL); String wsAddress = "http://localhost:8765/"; Endpoint.publish(wsAddress, new TestWebService()); l.log(Level.INFO,"The web service started. It can be located at " + wsAddress);
Bear in mind that most professional programs use log4j, not the JDK logging API