This content has been marked as final. Show 5 replies
It is mentioned before in the previous post to implement your own Handler.
If you look at java.util.logging.FileHandler you can see the implementation of the Handler which writes into a File.
Hope this give you some ideas
Handler handler = new FileHandler("/tmp/logFile.log"); handler.setLevel(Level.FINEST); handler.setFormatter(new SimpleFormatter()); // you may implement your own formatter; please let me know Logger logger = Logger.getLogger(MyClass.class.getName()); logger.addHandler(handler); logger.info("info");